pub trait Update: Default {
type Digest: Digest;
type Finalize: Finalize<Digest = Self::Digest, Update = Self>;
// Required methods
fn update(&mut self, data: impl AsRef<[u8]>);
fn finalize(&self) -> Self::Finalize;
fn reset(&mut self);
// Provided method
fn digest(&self) -> Self::Digest { ... }
}Expand description
A trait for hash objects in an in-progress state.
This trait defines the common interface for hash objects that are in the process of being updated with new data. Implementations of this trait typically maintain an internal state that evolves as new data is added.
Required Associated Types§
Required Methods§
Provided Methods§
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.