Trait ethers_middleware::policy::Policy [−][src]
pub trait Policy: Sync + Send + Debug {
type Error: Sync + Send + Debug;
fn ensure_can_send<'life0, 'async_trait>(
&'life0 self,
tx: TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<TypedTransaction, Self::Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Basic trait to ensure that transactions about to be sent follow certain rules.
Associated Types
Required methods
fn ensure_can_send<'life0, 'async_trait>(
&'life0 self,
tx: TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<TypedTransaction, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn ensure_can_send<'life0, 'async_trait>(
&'life0 self,
tx: TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<TypedTransaction, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Evaluates the transactions.
Returns Ok with the tx
or an Err otherwise.