Struct SeedableRandomState
pub struct SeedableRandomState { /* private fields */ }
A BuildHasher for quality::FoldHasher that is randomly
initialized by default, but can also be initialized with a specific seed.
This can be useful for e.g. testing, but the downside is that this type
has a size of 16 bytes rather than the 8 bytes RandomState is.
Implementations
impl SeedableRandomState
fn random() -> SelfGenerates a random
SeedableRandomState, similar toRandomState.fn fixed() -> SelfGenerates a fixed
SeedableRandomState, similar toFixedState.fn with_seed(per_hasher_seed: u64, shared_seed: &'static SharedSeed) -> SelfGenerates a
SeedableRandomStatewith the given per-hasher seed andSharedSeed.
Trait Implementations
impl BuildHasher for SeedableRandomState
type Hasher = FoldHasher<'static>;fn build_hasher(&self) -> FoldHasher<'static>
impl Clone for SeedableRandomState
fn clone(&self) -> SeedableRandomState
impl Debug for SeedableRandomState
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for SeedableRandomState
fn default() -> SeedableRandomState
Auto Trait Implementations
impl Freeze for SeedableRandomState
impl RefUnwindSafe for SeedableRandomState
impl Send for SeedableRandomState
impl Sync for SeedableRandomState
impl Unpin for SeedableRandomState
impl UnsafeUnpin for SeedableRandomState
impl UnwindSafe for SeedableRandomState
Blanket Implementations
impl<T> Any for SeedableRandomState
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for SeedableRandomState
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for SeedableRandomState
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for SeedableRandomState
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for SeedableRandomState
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for SeedableRandomState
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for SeedableRandomState
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 SeedableRandomState
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for SeedableRandomState
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>