Skip to main content

HostDigestWithStore

Trait HostDigestWithStore 

Source
pub trait HostDigestWithStore<T>: HasData + Send {
    // Required methods
    fn drop(
        accessor: &Accessor<T, Self>,
        rep: Resource<Digest>,
    ) -> impl Future<Output = Result<()>> + Send
       where Self: Sized;
    fn compute(
        accessor: &Accessor<T, Self>,
        self_: Resource<Digest>,
        data: StreamReader<u8>,
    ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send;
}

Required Methods§

Source

fn drop( accessor: &Accessor<T, Self>, rep: Resource<Digest>, ) -> impl Future<Output = Result<()>> + Send
where Self: Sized,

Source

fn compute( accessor: &Accessor<T, Self>, self_: Resource<Digest>, data: StreamReader<u8>, ) -> impl Future<Output = Result<Result<Vec<u8>, Error>>> + Send

Digest an entire byte stream. A success resolves only after the stream is fully drained (its writer dropped).

Fails only for operational reasons (error.other).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§