pub trait DynHasher: Send {
// Required methods
fn update(&mut self, data: &[u8]);
fn finalize(&mut self) -> Vec<u8> ⓘ;
// Provided method
fn update_mmap_rayon(&mut self, _path: &Path) -> Result<(), Error> { ... }
}Expand description
Trait to allow for dynamic dispatch of different hashers.
This is necessary because the Digest trait does not support dynamic dispatch,
and we want to be able to use different hash algorithms with the same interface.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".