pub trait HashWork: Hash + Eq {
// Required method
fn hash_work(&self) -> Result<u64, MemoryError>;
}Expand description
A trusted key type’s upper bound for hashing and equality work.
Implementations must cover all bytes examined by Hash and Eq. This is a contract for caller-provided code, not a value an untrusted document supplies. The bound must remain unchanged and successful while a key is stored, just as Hash and Eq must remain stable. Accounting retains this bound for rehashes.
Required Methods§
Sourcefn hash_work(&self) -> Result<u64, MemoryError>
fn hash_work(&self) -> Result<u64, MemoryError>
Work units for one hash/equality traversal, including constant overhead.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".