Skip to main content

HashKey

Trait HashKey 

Source
pub trait HashKey<Q: ?Sized> {
    // Required method
    fn hash_key(&self, key: &Q) -> usize;
}
Expand description

Produce a usize hash for a borrowed key Q.

Required Methods§

Source

fn hash_key(&self, key: &Q) -> usize

Hash key.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B: BuildHasher, Q: Hash + ?Sized> HashKey<Q> for StdHash<B>

Source§

impl<F, Q> HashKey<Q> for FnHash<F>
where F: Fn(&Q) -> usize, Q: ?Sized,