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.

Implementors§

Source§

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

impl<I: IpExt, L, BT: BindingsTypes> CoreTxMetadataContext<TxMetadata<I, WeakDeviceId<BT>, Icmp<BT>>, BT> for CoreCtx<'_, BT, L>

impl<I: IpExt, L, BT: BindingsTypes> CoreTxMetadataContext<TxMetadata<I, WeakDeviceId<BT>, Udp<BT>>, BT> for CoreCtx<'_, BT, L>