Struct levana_perpswap_cosmos::prelude::Event
#[non_exhaustive]pub struct Event {
pub ty: String,
pub attributes: Vec<Attribute>,
}
Expand description
A full Cosmos SDK event.
This version uses string attributes (similar to Cosmos SDK StringEvent),
which then get magically converted to bytes for Tendermint somewhere between
the Rust-Go interface, JSON deserialization and the NewEvent
call in Cosmos SDK.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.ty: String
The event type. This is renamed to “ty” because “type” is reserved in Rust. This sucks, we know.
attributes: Vec<Attribute>
The attributes to be included in the event.
You can learn more about these from Cosmos SDK docs.
Implementations§
§impl Event
impl Event
pub fn new(ty: impl Into<String>) -> Event
pub fn new(ty: impl Into<String>) -> Event
Create a new event with the given type and an empty list of attributes.
pub fn add_attribute(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Event
pub fn add_attribute( self, key: impl Into<String>, value: impl Into<String>, ) -> Event
Add an attribute to the event.
pub fn add_attributes<A>(self, attrs: impl IntoIterator<Item = A>) -> Eventwhere
A: Into<Attribute>,
pub fn add_attributes<A>(self, attrs: impl IntoIterator<Item = A>) -> Eventwhere
A: Into<Attribute>,
Bulk add attributes to the event.
Anything that can be turned into an iterator and yields something
that can be converted into an Attribute
is accepted.
Trait Implementations§
source§impl CosmwasmEventExt for Event
impl CosmwasmEventExt for Event
source§fn try_map_attr<B>(&self, key: &str, f: impl Fn(&str) -> B) -> Option<B>
fn try_map_attr<B>(&self, key: &str, f: impl Fn(&str) -> B) -> Option<B>
Parse the value associated with the key, if it exists
source§fn try_json_attr<B: DeserializeOwned>(&self, key: &str) -> Result<Option<B>>
fn try_json_attr<B: DeserializeOwned>(&self, key: &str) -> Result<Option<B>>
Parse the value associated with the key as JSON, if it exists
source§fn json_attr<B: DeserializeOwned>(&self, key: &str) -> Result<B>
fn json_attr<B: DeserializeOwned>(&self, key: &str) -> Result<B>
Parse the value associated with the key as JSON
source§fn try_u64_attr(&self, key: &str) -> Result<Option<u64>>
fn try_u64_attr(&self, key: &str) -> Result<Option<u64>>
Parse the value associated with the key as a u64, if it exists
source§fn try_timestamp_attr(&self, key: &str) -> Result<Option<Timestamp>>
fn try_timestamp_attr(&self, key: &str) -> Result<Option<Timestamp>>
Parse a timestamp attribute, if it exists
source§fn decimal_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<T>
fn decimal_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<T>
Parse an unsigned decimal attribute
source§fn non_zero_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<NonZero<T>>
fn non_zero_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<NonZero<T>>
Parse a non-zero (strictly positive) decimal attribute
source§fn signed_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<Signed<T>>
fn signed_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<Signed<T>>
Parse a signed decimal attribute
source§fn number_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<Signed<T>>
fn number_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<Signed<T>>
Parse a signed decimal attribute
source§fn try_number_attr<T: UnsignedDecimal>(
&self,
key: &str,
) -> Result<Option<Signed<T>>>
fn try_number_attr<T: UnsignedDecimal>( &self, key: &str, ) -> Result<Option<Signed<T>>>
Parse an optional signed decimal attribute
source§fn try_decimal_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<Option<T>>
fn try_decimal_attr<T: UnsignedDecimal>(&self, key: &str) -> Result<Option<T>>
Parse an optional unsigned decimal attribute
source§fn try_price_base_in_quote(&self, key: &str) -> Result<Option<PriceBaseInQuote>>
fn try_price_base_in_quote(&self, key: &str) -> Result<Option<PriceBaseInQuote>>
Parse an optional price
source§fn direction_attr(&self, key: &str) -> Result<DirectionToBase>
fn direction_attr(&self, key: &str) -> Result<DirectionToBase>
Parse an attribute with a position direction (to base)
source§fn leverage_to_base_attr(&self, key: &str) -> Result<LeverageToBase>
fn leverage_to_base_attr(&self, key: &str) -> Result<LeverageToBase>
Parse an attribute with the absolute leverage (to base)
source§fn try_leverage_to_base_attr(&self, key: &str) -> Result<Option<LeverageToBase>>
fn try_leverage_to_base_attr(&self, key: &str) -> Result<Option<LeverageToBase>>
Parse an optional attribute with the absolute leverage (to base)
source§fn unchecked_addr_attr(&self, key: &str) -> Result<Addr>
fn unchecked_addr_attr(&self, key: &str) -> Result<Addr>
Parse an address attribute without checking validity
source§fn try_unchecked_addr_attr(&self, key: &str) -> Result<Option<Addr>>
fn try_unchecked_addr_attr(&self, key: &str) -> Result<Option<Addr>>
Parse an optional address attribute without checking validity
§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Event, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&FundingPaymentEvent> for Event
impl From<&FundingPaymentEvent> for Event
source§fn from(src: &FundingPaymentEvent) -> Self
fn from(src: &FundingPaymentEvent) -> Self
Converts to this type from the input type.
source§impl From<&InsufficientMarginEvent> for Event
impl From<&InsufficientMarginEvent> for Event
source§fn from(_: &InsufficientMarginEvent) -> Self
fn from(_: &InsufficientMarginEvent) -> Self
Converts to this type from the input type.
source§impl From<AllowanceChangeEvent> for Event
impl From<AllowanceChangeEvent> for Event
source§fn from(src: AllowanceChangeEvent) -> Self
fn from(src: AllowanceChangeEvent) -> Self
Converts to this type from the input type.
source§impl From<ApprovalEvent> for Event
impl From<ApprovalEvent> for Event
source§fn from(src: ApprovalEvent) -> Self
fn from(src: ApprovalEvent) -> Self
Converts to this type from the input type.
source§impl From<ApproveAllEvent> for Event
impl From<ApproveAllEvent> for Event
source§fn from(src: ApproveAllEvent) -> Self
fn from(src: ApproveAllEvent) -> Self
Converts to this type from the input type.
source§impl From<BorrowFeeChangeEvent> for Event
impl From<BorrowFeeChangeEvent> for Event
source§fn from(_: BorrowFeeChangeEvent) -> Self
fn from(_: BorrowFeeChangeEvent) -> Self
Converts to this type from the input type.
source§impl From<CancelLimitOrderEvent> for Event
impl From<CancelLimitOrderEvent> for Event
source§fn from(src: CancelLimitOrderEvent) -> Self
fn from(src: CancelLimitOrderEvent) -> Self
Converts to this type from the input type.
source§impl From<CrankExecBatchEvent> for Event
impl From<CrankExecBatchEvent> for Event
source§fn from(_: CrankExecBatchEvent) -> Self
fn from(_: CrankExecBatchEvent) -> Self
Converts to this type from the input type.
source§impl From<CrankFeeEarnedEvent> for Event
impl From<CrankFeeEarnedEvent> for Event
source§fn from(_: CrankFeeEarnedEvent) -> Self
fn from(_: CrankFeeEarnedEvent) -> Self
Converts to this type from the input type.
source§impl From<CrankFeeEvent> for Event
impl From<CrankFeeEvent> for Event
source§fn from(_: CrankFeeEvent) -> Self
fn from(_: CrankFeeEvent) -> Self
Converts to this type from the input type.
source§impl From<CrankWorkInfoEvent> for Event
impl From<CrankWorkInfoEvent> for Event
source§fn from(_: CrankWorkInfoEvent) -> Self
fn from(_: CrankWorkInfoEvent) -> Self
Converts to this type from the input type.
source§impl From<DeferredExecExecutedEvent> for Event
impl From<DeferredExecExecutedEvent> for Event
source§fn from(_: DeferredExecExecutedEvent) -> Self
fn from(_: DeferredExecExecutedEvent) -> Self
Converts to this type from the input type.
source§impl From<DeferredExecQueuedEvent> for Event
impl From<DeferredExecQueuedEvent> for Event
source§fn from(_: DeferredExecQueuedEvent) -> Self
fn from(_: DeferredExecQueuedEvent) -> Self
Converts to this type from the input type.
source§impl From<DeltaNeutralityFeeEvent> for Event
impl From<DeltaNeutralityFeeEvent> for Event
source§fn from(src: DeltaNeutralityFeeEvent) -> Self
fn from(src: DeltaNeutralityFeeEvent) -> Self
Converts to this type from the input type.
source§impl From<DeltaNeutralityRatioEvent> for Event
impl From<DeltaNeutralityRatioEvent> for Event
source§fn from(_: DeltaNeutralityRatioEvent) -> Self
fn from(_: DeltaNeutralityRatioEvent) -> Self
Converts to this type from the input type.
source§impl From<DepositEvent> for Event
impl From<DepositEvent> for Event
source§fn from(src: DepositEvent) -> Self
fn from(src: DepositEvent) -> Self
Converts to this type from the input type.
source§impl From<ExecuteLimitOrderEvent> for Event
impl From<ExecuteLimitOrderEvent> for Event
source§fn from(src: ExecuteLimitOrderEvent) -> Self
fn from(src: ExecuteLimitOrderEvent) -> Self
Converts to this type from the input type.
source§impl From<FeesReturnedEvent> for Event
impl From<FeesReturnedEvent> for Event
source§fn from(_: FeesReturnedEvent) -> Self
fn from(_: FeesReturnedEvent) -> Self
Converts to this type from the input type.
source§impl From<FundingPaymentEvent> for Event
impl From<FundingPaymentEvent> for Event
source§fn from(src: FundingPaymentEvent) -> Self
fn from(src: FundingPaymentEvent) -> Self
Converts to this type from the input type.
source§impl From<FundingRateChangeEvent> for Event
impl From<FundingRateChangeEvent> for Event
source§fn from(_: FundingRateChangeEvent) -> Self
fn from(_: FundingRateChangeEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<IbcChannelCloseEvent<'a>> for Event
impl<'a> From<IbcChannelCloseEvent<'a>> for Event
source§fn from(src: IbcChannelCloseEvent<'_>) -> Self
fn from(src: IbcChannelCloseEvent<'_>) -> Self
Converts to this type from the input type.
source§impl<'a> From<IbcChannelConnectEvent<'a>> for Event
impl<'a> From<IbcChannelConnectEvent<'a>> for Event
source§fn from(src: IbcChannelConnectEvent<'_>) -> Self
fn from(src: IbcChannelConnectEvent<'_>) -> Self
Converts to this type from the input type.
source§impl From<InstantiateEvent> for Event
impl From<InstantiateEvent> for Event
source§fn from(_: InstantiateEvent) -> Self
fn from(_: InstantiateEvent) -> Self
Converts to this type from the input type.
source§impl From<InstantiateEvent> for Event
impl From<InstantiateEvent> for Event
source§fn from(_: InstantiateEvent) -> Self
fn from(_: InstantiateEvent) -> Self
Converts to this type from the input type.
source§impl From<InsufficientMarginEvent> for Event
impl From<InsufficientMarginEvent> for Event
source§fn from(event: InsufficientMarginEvent) -> Self
fn from(event: InsufficientMarginEvent) -> Self
Converts to this type from the input type.
source§impl From<LiquidityPoolSizeEvent> for Event
impl From<LiquidityPoolSizeEvent> for Event
source§fn from(src: LiquidityPoolSizeEvent) -> Self
fn from(src: LiquidityPoolSizeEvent) -> Self
Converts to this type from the input type.
source§impl From<LockUpdateEvent> for Event
impl From<LockUpdateEvent> for Event
source§fn from(src: LockUpdateEvent) -> Self
fn from(src: LockUpdateEvent) -> Self
Converts to this type from the input type.
source§impl<'a> From<LogoChangeEvent<'a>> for Event
impl<'a> From<LogoChangeEvent<'a>> for Event
source§fn from(src: LogoChangeEvent<'_>) -> Self
fn from(src: LogoChangeEvent<'_>) -> Self
Converts to this type from the input type.
source§impl From<LpActionEvent> for Event
impl From<LpActionEvent> for Event
source§fn from(src: LpActionEvent) -> Self
fn from(src: LpActionEvent) -> Self
Converts to this type from the input type.
source§impl From<LpDepositEvent> for Event
impl From<LpDepositEvent> for Event
source§fn from(src: LpDepositEvent) -> Self
fn from(src: LpDepositEvent) -> Self
Converts to this type from the input type.
source§impl From<LpYieldEvent> for Event
impl From<LpYieldEvent> for Event
source§fn from(_: LpYieldEvent) -> Self
fn from(_: LpYieldEvent) -> Self
Converts to this type from the input type.
source§impl From<MarketingChangeEvent> for Event
impl From<MarketingChangeEvent> for Event
source§fn from(src: MarketingChangeEvent) -> Self
fn from(src: MarketingChangeEvent) -> Self
Converts to this type from the input type.
source§impl From<MigrateEvent> for Event
impl From<MigrateEvent> for Event
source§fn from(_: MigrateEvent) -> Self
fn from(_: MigrateEvent) -> Self
Converts to this type from the input type.
source§impl From<MinterChangeEvent> for Event
impl From<MinterChangeEvent> for Event
source§fn from(src: MinterChangeEvent) -> Self
fn from(src: MinterChangeEvent) -> Self
Converts to this type from the input type.
source§impl From<NewCodeIdEvent> for Event
impl From<NewCodeIdEvent> for Event
source§fn from(_: NewCodeIdEvent) -> Self
fn from(_: NewCodeIdEvent) -> Self
Converts to this type from the input type.
source§impl From<NewTracker> for Event
impl From<NewTracker> for Event
source§fn from(_: NewTracker) -> Self
fn from(_: NewTracker) -> Self
Converts to this type from the input type.
source§impl From<PlaceLimitOrderEvent> for Event
impl From<PlaceLimitOrderEvent> for Event
source§fn from(src: PlaceLimitOrderEvent) -> Self
fn from(src: PlaceLimitOrderEvent) -> Self
Converts to this type from the input type.
source§impl From<PositionActionEvent> for Event
impl From<PositionActionEvent> for Event
source§fn from(src: PositionActionEvent) -> Self
fn from(src: PositionActionEvent) -> Self
Converts to this type from the input type.
source§impl From<PositionOpenEvent> for Event
impl From<PositionOpenEvent> for Event
source§fn from(src: PositionOpenEvent) -> Self
fn from(src: PositionOpenEvent) -> Self
Converts to this type from the input type.
source§impl From<PositionSaveEvent> for Event
impl From<PositionSaveEvent> for Event
source§fn from(_: PositionSaveEvent) -> Self
fn from(_: PositionSaveEvent) -> Self
Converts to this type from the input type.
source§impl From<PositionUpdateEvent> for Event
impl From<PositionUpdateEvent> for Event
source§fn from(_: PositionUpdateEvent) -> Self
fn from(_: PositionUpdateEvent) -> Self
Converts to this type from the input type.
source§impl From<RevokeAllEvent> for Event
impl From<RevokeAllEvent> for Event
source§fn from(src: RevokeAllEvent) -> Self
fn from(src: RevokeAllEvent) -> Self
Converts to this type from the input type.
source§impl From<RevokeEvent> for Event
impl From<RevokeEvent> for Event
source§fn from(src: RevokeEvent) -> Self
fn from(src: RevokeEvent) -> Self
Converts to this type from the input type.
source§impl From<SpotPriceEvent> for Event
impl From<SpotPriceEvent> for Event
source§fn from(src: SpotPriceEvent) -> Self
fn from(src: SpotPriceEvent) -> Self
Converts to this type from the input type.
source§impl From<TradeVolumeEvent> for Event
impl From<TradeVolumeEvent> for Event
source§fn from(src: TradeVolumeEvent) -> Self
fn from(src: TradeVolumeEvent) -> Self
Converts to this type from the input type.
source§impl From<TransferEvent> for Event
impl From<TransferEvent> for Event
source§fn from(src: TransferEvent) -> Self
fn from(src: TransferEvent) -> Self
Converts to this type from the input type.
source§impl From<TransferEvent> for Event
impl From<TransferEvent> for Event
source§fn from(src: TransferEvent) -> Self
fn from(src: TransferEvent) -> Self
Converts to this type from the input type.
source§impl From<UnlockEvent> for Event
impl From<UnlockEvent> for Event
source§fn from(src: UnlockEvent) -> Self
fn from(src: UnlockEvent) -> Self
Converts to this type from the input type.
source§impl From<WithdrawEvent> for Event
impl From<WithdrawEvent> for Event
source§fn from(src: WithdrawEvent) -> Self
fn from(src: WithdrawEvent) -> Self
Converts to this type from the input type.
§impl JsonSchema for Event
impl JsonSchema for Event
§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read more§impl Serialize for Event
impl Serialize for Event
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl TryFrom<Event> for BorrowFeeChangeEvent
impl TryFrom<Event> for BorrowFeeChangeEvent
source§impl TryFrom<Event> for CancelLimitOrderEvent
impl TryFrom<Event> for CancelLimitOrderEvent
source§impl TryFrom<Event> for CrankFeeEarnedEvent
impl TryFrom<Event> for CrankFeeEarnedEvent
source§impl TryFrom<Event> for CrankFeeEvent
impl TryFrom<Event> for CrankFeeEvent
source§impl TryFrom<Event> for CrankWorkInfo
impl TryFrom<Event> for CrankWorkInfo
source§impl TryFrom<Event> for CrankWorkInfoEvent
impl TryFrom<Event> for CrankWorkInfoEvent
source§impl TryFrom<Event> for DeferredExecExecutedEvent
impl TryFrom<Event> for DeferredExecExecutedEvent
source§impl TryFrom<Event> for DeferredExecQueuedEvent
impl TryFrom<Event> for DeferredExecQueuedEvent
source§impl TryFrom<Event> for DeltaNeutralityRatioEvent
impl TryFrom<Event> for DeltaNeutralityRatioEvent
source§impl TryFrom<Event> for ExecuteLimitOrderEvent
impl TryFrom<Event> for ExecuteLimitOrderEvent
source§impl TryFrom<Event> for FundingPaymentEvent
impl TryFrom<Event> for FundingPaymentEvent
source§impl TryFrom<Event> for FundingRateChangeEvent
impl TryFrom<Event> for FundingRateChangeEvent
source§impl TryFrom<Event> for InstantiateEvent
impl TryFrom<Event> for InstantiateEvent
source§impl TryFrom<Event> for LiquidityPoolSizeEvent
impl TryFrom<Event> for LiquidityPoolSizeEvent
source§impl TryFrom<Event> for LpActionEvent
impl TryFrom<Event> for LpActionEvent
source§impl TryFrom<Event> for LpDepositEvent
impl TryFrom<Event> for LpDepositEvent
source§impl TryFrom<Event> for LpYieldEvent
impl TryFrom<Event> for LpYieldEvent
source§impl TryFrom<Event> for PlaceLimitOrderEvent
impl TryFrom<Event> for PlaceLimitOrderEvent
source§impl TryFrom<Event> for PositionActionEvent
impl TryFrom<Event> for PositionActionEvent
source§impl TryFrom<Event> for PositionAttributes
impl TryFrom<Event> for PositionAttributes
source§impl TryFrom<Event> for PositionCloseEvent
impl TryFrom<Event> for PositionCloseEvent
source§impl TryFrom<Event> for PositionOpenEvent
impl TryFrom<Event> for PositionOpenEvent
source§impl TryFrom<Event> for PositionUpdateEvent
impl TryFrom<Event> for PositionUpdateEvent
source§impl TryFrom<Event> for SpotPriceEvent
impl TryFrom<Event> for SpotPriceEvent
source§impl TryFrom<Event> for TradeVolumeEvent
impl TryFrom<Event> for TradeVolumeEvent
source§impl TryFrom<PositionCloseEvent> for Event
impl TryFrom<PositionCloseEvent> for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> QueryResultExt for Twhere
T: Serialize,
impl<T> QueryResultExt for Twhere
T: Serialize,
source§fn query_result(&self) -> Result<Binary, Error>
fn query_result(&self) -> Result<Binary, Error>
Convert the value to its JSON representation