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> Freeze for Hashed<V, H>where
V: Freeze,
impl<V, H> RefUnwindSafe for Hashed<V, H>where
V: RefUnwindSafe,
H: 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
V: UnwindSafe,
H: 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