pub trait AsyncObjects<'p, P: Digest<'p>> {
type Error;
// Required methods
fn len(&self) -> usize;
fn run<W: Work>(
&mut self,
index: usize,
batch: DigestBatch<'p, P>,
work: &W,
) -> impl Future<Output = PassResult<DigestMemo<'p, P>, Self::Error, P::Error>>;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
An original object group whose complete streams can suspend for acquisition. Each batch already contains every requested chain algorithm. Implementations must return its outputs only after that object’s complete successful input.
Required Associated Types§
Required Methods§
Sourcefn run<W: Work>(
&mut self,
index: usize,
batch: DigestBatch<'p, P>,
work: &W,
) -> impl Future<Output = PassResult<DigestMemo<'p, P>, Self::Error, P::Error>>
fn run<W: Work>( &mut self, index: usize, batch: DigestBatch<'p, P>, work: &W, ) -> impl Future<Output = PassResult<DigestMemo<'p, P>, Self::Error, P::Error>>
Completes this batch for the original object at index. The supplied
work applies to acquisition, validation and the batch’s own callbacks.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".