Struct rustc_data_structures::unhash::Unhasher
source · pub struct Unhasher {
value: u64,
}
Expand description
This no-op hasher expects only a single write_u64
call. It’s intended for
map keys that already have hash-like quality, like Fingerprint
.
Fields
value: u64
Trait Implementations
sourceimpl FingerprintHasher for Unhasher
impl FingerprintHasher for Unhasher
fn write_fingerprint(&mut self, fingerprint: &Fingerprint)
sourceimpl Hasher for Unhasher
impl Hasher for Unhasher
1.26.0 · sourcefn write_u128(&mut self, i: u128)
fn write_u128(&mut self, i: u128)
Writes a single
u128
into this hasher.1.3.0 · sourcefn write_usize(&mut self, i: usize)
fn write_usize(&mut self, i: usize)
Writes a single
usize
into this hasher.1.26.0 · sourcefn write_i128(&mut self, i: i128)
fn write_i128(&mut self, i: i128)
Writes a single
i128
into this hasher.1.3.0 · sourcefn write_isize(&mut self, i: isize)
fn write_isize(&mut self, i: isize)
Writes a single
isize
into this hasher.sourcefn 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 RefUnwindSafe for Unhasher
impl Send for Unhasher
impl Sync for Unhasher
impl Unpin for Unhasher
impl UnwindSafe for Unhasher
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> Erased for T
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes