Trait single_use_seals::SealWitnessAsync
source · pub trait SealWitnessAsync<Seal>{
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§
Required Methods§
sourcefn 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,
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§
sourcefn 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,
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.