Struct FxSeededState

pub struct FxSeededState { /* private fields */ }

FxSeededState is an alternative state for HashMap types, allowing to use FxHasher with a set seed.

# use std::collections::HashMap;
use rustc_hash::FxSeededState;

let mut map = HashMap::with_hasher(FxSeededState::with_seed(12));
map.insert(15, 610);
assert_eq!(map[&15], 610);

Implementations

impl FxSeededState

const fn with_seed(seed: usize) -> FxSeededState

Constructs a new FxSeededState that is initialized with a seed.

Trait Implementations

impl BuildHasher for FxSeededState

type Hasher = FxHasher;
fn build_hasher(&self) -> Self::Hasher

impl Clone for FxSeededState

fn clone(&self) -> Self

Auto Trait Implementations

impl Freeze for FxSeededState

impl RefUnwindSafe for FxSeededState

impl Send for FxSeededState

impl Sync for FxSeededState

impl Unpin for FxSeededState

impl UnsafeUnpin for FxSeededState

impl UnwindSafe for FxSeededState

Blanket Implementations

impl<T> Any for FxSeededState where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for FxSeededState where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for FxSeededState where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for FxSeededState where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for FxSeededState

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for FxSeededState where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for FxSeededState where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for FxSeededState where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for FxSeededState where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>