Trait ethers_middleware::policy::Policy
source · 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§
sourcefn 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,
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.