pub trait TryHash {
type Error;
// Required method
fn try_hash<H: Hasher>(&self, state: &mut H) -> Result<(), Self::Error>;
// Provided method
fn try_hash_slice<H: Hasher>(
data: &[Self],
state: &mut H,
) -> Result<(), Self::Error>
where Self: Sized { ... }
}Expand description
The try trait for Hash.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn try_hash_slice<H: Hasher>(
data: &[Self],
state: &mut H,
) -> Result<(), Self::Error>where
Self: Sized,
fn try_hash_slice<H: Hasher>(
data: &[Self],
state: &mut H,
) -> Result<(), Self::Error>where
Self: Sized,
The fallible equivalent of Hash::hash_slice.
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.