Skip to main content

CoreTxMetadataContext

Trait CoreTxMetadataContext 

Source
pub trait CoreTxMetadataContext<T, BT: TxMetadataBindingsTypes> {
    // Required method
    fn convert_tx_meta(&self, tx_meta: T) -> BT::TxMetadata;
}
Expand description

A core context providing tx metadata type conversion.

This trait is used to convert from a core-internal tx metadata type T to the metadata supported by bindings in BT::TxMetadata.

Required Methods§

Source

fn convert_tx_meta(&self, tx_meta: T) -> BT::TxMetadata

Converts the tx metadata T into the type set by bindings.

Note that this method takes a self receiver so it’s easily implementable with uninstantiable types. The conversion is expected to be stateless otherwise in all implementers.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, BT, C> CoreTxMetadataContext<T, BT> for UninstantiableWrapper<C>

Source§

impl<T, S, Meta, DeviceId, BT> CoreTxMetadataContext<T, BT> for FakeCoreCtx<S, Meta, DeviceId>
where BT: TxMetadataBindingsTypes<TxMetadata = FakeTxMetadata>,