pub trait SealWitnessAsync<Seal>
where Seal: Sync + Send,
{ type Message: Sync; type Error: Error; // Required method fn verify_seal_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, seal: &'life1 Seal, msg: &'life2 Self::Message ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; // Provided method fn verify_all_seals_async<'seal, 'life0, 'life1, 'async_trait, I>( &'life0 self, seals: I, msg: &'life1 Self::Message ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>> where I: IntoIterator<Item = &'seal Seal> + Send + 'async_trait, I::IntoIter: Send, Seal: 'seal, Self: Sync + 'async_trait, 'seal: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } }
Expand description

Async version of SealWitness which can verify seal or multiple seals.

Required Associated Types§

source

type Message: Sync

Message type that is supported by the current single-use-seal

source

type Error: Error

Error type that contains reasons of medium access failure

Required Methods§

source

fn verify_seal_async<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, seal: &'life1 Seal, msg: &'life2 Self::Message ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Verifies that the seal was indeed closed over the message with the provided seal closure witness.

Provided Methods§

source

fn verify_all_seals_async<'seal, 'life0, 'life1, 'async_trait, I>( &'life0 self, seals: I, msg: &'life1 Self::Message ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where I: IntoIterator<Item = &'seal Seal> + Send + 'async_trait, I::IntoIter: Send, Seal: 'seal, Self: Sync + 'async_trait, 'seal: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Performs batch verification of the seals.

Default implementation iterates through the seals and calls Self::verify_seal_async for each of them, returning false on first failure (not verifying the rest of seals).

Object Safety§

This trait is not object safe.

Implementors§