Struct bevy_utils::Hashed
source · pub struct Hashed<V, H = FixedState> { /* 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: Eq, H> Eq for Hashed<V, H>
Auto Trait Implementations§
impl<V, H> RefUnwindSafe for Hashed<V, H>where
H: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, H> Send for Hashed<V, H>
impl<V, H> Sync for Hashed<V, H>
impl<V, H> Unpin for Hashed<V, H>
impl<V, H> UnwindSafe for Hashed<V, H>where
H: UnwindSafe,
V: 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.