Trait ParallelDigest

Source
pub trait ParallelDigest: Send {
    type Digest: Digest + Send;

    // Required methods
    fn new() -> Self;
    fn new_with_prefix(data: impl AsRef<[u8]>) -> Self;
    fn digest(
        &self,
        source: impl IndexedParallelIterator<Item: Serializable>,
        out: &mut [MaybeUninit<Output<Self::Digest>>],
    );
}

Required Associated Types§

Source

type Digest: Digest + Send

The corresponding non-parallelized hash function.

Required Methods§

Source

fn new() -> Self

Create new hasher instance with empty state.

Source

fn new_with_prefix(data: impl AsRef<[u8]>) -> Self

Create new hasher instance which has processed the provided data.

Source

fn digest( &self, source: impl IndexedParallelIterator<Item: Serializable>, out: &mut [MaybeUninit<Output<Self::Digest>>], )

Calculate the digest of multiple hashes where each of them is serialized into the same number of bytes.

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§

Source§

impl<D: MultiDigest<N, Digest: Send> + Send + Sync, const N: usize> ParallelDigest for ParallelMulidigestImpl<D, N>

Source§

impl<D: Digest + Send + Sync + Clone> ParallelDigest for D