pub struct FxHasher { /* fields omitted */ }A speedy hash algorithm for use within rustc. The hashmap in liballoc
by default uses SipHash which isn't quite as speedy as we want. In the
compiler we're not really worried about DOS attempts, so we use a fast
non-cryptographic hash.
This is the same as the algorithm used by Firefox -- which is a homespun
one not based on any widely-known algorithm -- though modified to produce
64-bit hash values instead of 32-bit hash values. It consistently
out-performs an FNV-based hash within rustc itself -- the collision rate is
similar or slightly worse than FNV, but the speed of the hash function
itself is much higher because it works on up to 8 bytes at a time.
Writes a single u8 into this hasher.
Writes a single u16 into this hasher.
Writes a single u32 into this hasher.
Writes a single u64 into this hasher.
Writes a single usize into this hasher.
Returns the hash value for the values written so far. Read more
Writes a single u128 into this hasher.
Writes a single i8 into this hasher.
Writes a single i16 into this hasher.
Writes a single i32 into this hasher.
Writes a single i64 into this hasher.
Writes a single i128 into this hasher.
Writes a single isize into this hasher.
Returns the "default value" for a type. Read more
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more