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
sourceimpl<V: PartialEq, H> PartialEq<Hashed<V, H>> for Hashed<V, H>
impl<V: PartialEq, H> PartialEq<Hashed<V, H>> 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> where
H: Send,
V: Send,
impl<V, H> Sync for Hashed<V, H> where
H: Sync,
V: Sync,
impl<V, H> Unpin for Hashed<V, H> where
H: Unpin,
V: Unpin,
impl<V, H> UnwindSafe for Hashed<V, H> where
H: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CallHasher for T where
T: Hash + ?Sized,
impl<T> CallHasher for T where
T: Hash + ?Sized,
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more