Struct FxHasher
struct FxHasher { ... }
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.
The current implementation is a fast polynomial hash with a single bit rotation as a finishing step designed by Orson Peters.
Implementations
impl FxHasher
const fn with_seed(seed: usize) -> FxHasherCreates a
fxhasher with a given seed.const fn default() -> FxHasherCreates a default
fxhasher.
impl Clone for FxHasher
fn clone(self: &Self) -> FxHasher
impl Default for FxHasher
fn default() -> FxHasher
impl Freeze for FxHasher
impl Hasher for FxHasher
fn write(self: &mut Self, bytes: &[u8])fn write_u8(self: &mut Self, i: u8)fn write_u16(self: &mut Self, i: u16)fn write_u32(self: &mut Self, i: u32)fn write_u64(self: &mut Self, i: u64)fn write_u128(self: &mut Self, i: u128)fn write_usize(self: &mut Self, i: usize)fn finish(self: &Self) -> u64
impl RefUnwindSafe for FxHasher
impl Send for FxHasher
impl Sync for FxHasher
impl Unpin for FxHasher
impl UnsafeUnpin for FxHasher
impl UnwindSafe for FxHasher
impl<T> Any for FxHasher
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for FxHasher
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for FxHasher
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for FxHasher
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for FxHasher
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for FxHasher
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for FxHasher
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for FxHasher
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for FxHasher
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>