Skip to main content

AsyncObjects

Trait AsyncObjects 

Source
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§

Source

type Error

Original acquisition or format-specific comparison failure.

Required Methods§

Source

fn len(&self) -> usize

Number of original objects, including repeated group occurrences.

Source

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§

Source

fn is_empty(&self) -> bool

Whether the supplied group has no objects.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'p, P: Digest<'p>, S: AsyncSource> AsyncObjects<'p, P> for AsyncStreams<'_, S>