HasherExt

Trait HasherExt 

Source
pub trait HasherExt: Hasher {
    // Required method
    fn hash_iter<'a>(
        &self,
        slices: impl Iterator<Item = &'a [u8]>,
    ) -> Self::Digest;
}
Expand description

Extension trait for Hasher to provide iterator-based hashing.

Required Methods§

Source

fn hash_iter<'a>(&self, slices: impl Iterator<Item = &'a [u8]>) -> Self::Digest

Hashes an iterator of byte slices.

This method allows for more efficient hashing by avoiding the need to allocate a contiguous buffer when the input data is already available as discrete slices.

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§