pub trait Policy: Sync + Send + Debug {
    type Error: Sync + Send + Debug;

    // Required method
    fn ensure_can_send<'life0, 'async_trait>(
        &'life0 self,
        tx: TypedTransaction
    ) -> Pin<Box<dyn Future<Output = Result<TypedTransaction, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Basic trait to ensure that transactions about to be sent follow certain rules.

Required Associated Types§

Required Methods§

source

fn ensure_can_send<'life0, 'async_trait>( &'life0 self, tx: TypedTransaction ) -> Pin<Box<dyn Future<Output = Result<TypedTransaction, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Evaluates the transactions.

Returns Ok with the tx or an Err otherwise.

Implementors§