Struct FxHasher
pub struct FxHasher { /* private fields */ }
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.
Trait Implementations
impl Clone for FxHasher
fn clone(&self) -> Self
impl Default for FxHasher
fn default() -> Self
impl Hasher for FxHasher
fn write(&mut self, bytes: &[u8])fn write_u8(&mut self, i: u8)fn write_u16(&mut self, i: u16)fn write_u32(&mut self, i: u32)fn write_u64(&mut self, i: u64)fn write_u128(&mut self, i: u128)fn write_usize(&mut self, i: usize)fn finish(&self) -> u64
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
impl<T> Any for FxHasher
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for FxHasher
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for FxHasher
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for FxHasher
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for FxHasher
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for FxHasher
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for FxHasher
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for FxHasher
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for FxHasher
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>