pub trait HashDef: Sized {
type Hash: Sized;
const HASHER: fn(&str) -> Self::Hash;
// Required methods
fn new(hash: Self::Hash) -> Self;
fn is_null(&self) -> bool;
// Provided method
fn hashed(s: &str) -> Self { ... }
}Expand description
Trait for hash values types
This trait is implemented by types created with crate::define_hash_type!().
Required Associated Constants§
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.