Struct SeedableRandomState
pub struct SeedableRandomState { /* private fields */ }Expand description
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
impl SeedableRandomState
pub fn random() -> SeedableRandomState
pub fn random() -> SeedableRandomState
Generates a random SeedableRandomState, similar to RandomState.
pub fn fixed() -> SeedableRandomState
pub fn fixed() -> SeedableRandomState
Generates a fixed SeedableRandomState, similar to FixedState.
pub fn with_seed(
per_hasher_seed: u64,
shared_seed: &'static SharedSeed,
) -> SeedableRandomState
pub fn with_seed( per_hasher_seed: u64, shared_seed: &'static SharedSeed, ) -> SeedableRandomState
Generates a SeedableRandomState with the given per-hasher seed
and SharedSeed.
Trait Implementations§
§impl BuildHasher for SeedableRandomState
impl BuildHasher for SeedableRandomState
§impl Clone for SeedableRandomState
impl Clone for SeedableRandomState
§fn clone(&self) -> SeedableRandomState
fn clone(&self) -> SeedableRandomState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SeedableRandomState
impl Debug for SeedableRandomState
§impl Default for SeedableRandomState
impl Default for SeedableRandomState
§fn default() -> SeedableRandomState
fn default() -> SeedableRandomState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SeedableRandomState
impl RefUnwindSafe for SeedableRandomState
impl Send for SeedableRandomState
impl Sync for SeedableRandomState
impl Unpin for SeedableRandomState
impl UnwindSafe for SeedableRandomState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more