pub struct FxHasher { /* private fields */ }Expand description
Non-cryptographic hasher for in-memory frame-to-frame change detection.
Every step of the fold — rotate, xor with the next word, multiply by an odd
constant — is a bijection on u64, so equal-length inputs never collide
structurally; only the unavoidable 64-bit pigeonhole remains. finish
applies the SplitMix64 finalizer, itself a bijection, which adds no
collisions and gives full avalanche so the result is safe to use directly as
a HashMap key hash.
Trait Implementations§
impl Copy for FxHasher
Source§impl Hasher for FxHasher
impl Hasher for FxHasher
Source§fn write_u128(&mut self, value: u128)
fn write_u128(&mut self, value: u128)
Writes a single
u128 into this hasher.Source§fn write_usize(&mut self, value: usize)
fn write_usize(&mut self, value: usize)
Writes a single
usize into this hasher.1.26.0 · Source§fn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
Writes a single
i128 into this hasher.1.3.0 · Source§fn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
Writes a single
isize into this hasher.Source§fn write_length_prefix(&mut self, len: usize)
fn write_length_prefix(&mut self, len: usize)
🔬This is a nightly-only experimental API. (
hasher_prefixfree_extras)Writes a length prefix into this hasher, as part of being prefix-free. Read more
Auto Trait Implementations§
impl Freeze for FxHasher
impl RefUnwindSafe for FxHasher
impl Send for FxHasher
impl Sync for FxHasher
impl Unpin for FxHasher
impl UnsafeUnpin for FxHasher
impl UnwindSafe for FxHasher
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