Skip to main content

TxInfoMapper

Trait TxInfoMapper 

pub trait TxInfoMapper<T> {
    type Out;
    type Err;

    // Required method
    fn try_map(
        &self,
        tx: &T,
        tx_info: TransactionInfo,
    ) -> Result<Self::Out, Self::Err>;
}
Available on crate feature rpc only.
Expand description

Adds extra context to TransactionInfo.

Required Associated Types§

type Out

An associated output type that carries TransactionInfo with some extra context.

type Err

An associated error that can occur during the mapping.

Required Methods§

fn try_map( &self, tx: &T, tx_info: TransactionInfo, ) -> Result<Self::Out, Self::Err>

Performs the conversion.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

§

impl<T> TxInfoMapper<T> for ()

§

type Out = TransactionInfo

§

type Err = Infallible

§

fn try_map( &self, _tx: &T, tx_info: TransactionInfo, ) -> Result<<() as TxInfoMapper<T>>::Out, <() as TxInfoMapper<T>>::Err>

Implementors§