pub trait Checksum {
type Output: ChecksumOutput;
// Required methods
fn new() -> Self;
fn update(&mut self, data: &[u8]);
fn sum(self) -> Self::Output;
// Provided method
fn checksum(data: &[u8]) -> Self::Output
where Self: Sized { ... }
}Expand description
Required Associated Types§
Sourcetype Output: ChecksumOutput
type Output: ChecksumOutput
The type of the resulting checksum value.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".