pub struct Hashed<V, S = FixedHasher> { /* private fields */ }Expand description
A pre-hashed value of a specific type. Pre-hashing enables memoization of hashes that are expensive to compute.
It also enables faster PartialEq comparisons by short circuiting on hash equality.
See PassHash and PassHasher for a “pass through” BuildHasher and Hasher implementation
designed to work with Hashed
See PreHashMap for a hashmap pre-configured to use Hashed keys.
Implementations§
Trait Implementations§
Source§impl<V: PartialEq, H> PartialEq for Hashed<V, H>
 
impl<V: PartialEq, H> PartialEq for Hashed<V, H>
impl<V: Copy, H> Copy for Hashed<V, H>
impl<V: Eq, H> Eq for Hashed<V, H>
Auto Trait Implementations§
impl<V, S> Freeze for Hashed<V, S>where
    V: Freeze,
impl<V, S> RefUnwindSafe for Hashed<V, S>where
    V: RefUnwindSafe,
    S: RefUnwindSafe,
impl<V, S> Send for Hashed<V, S>
impl<V, S> Sync for Hashed<V, S>
impl<V, S> Unpin for Hashed<V, S>
impl<V, S> UnwindSafe for Hashed<V, S>where
    V: UnwindSafe,
    S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.