pub struct SeedableRandomState {
inner: SeedableRandomState,
}
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.
Fields§
§inner: SeedableRandomState
Implementations§
Source§impl SeedableRandomState
impl SeedableRandomState
Sourcepub fn random() -> Self
pub fn random() -> Self
Generates a random SeedableRandomState
, similar to RandomState
.
Sourcepub fn fixed() -> Self
pub fn fixed() -> Self
Generates a fixed SeedableRandomState
, similar to FixedState
.
Sourcepub fn with_seed(per_hasher_seed: u64, shared_seed: &'static SharedSeed) -> Self
pub fn with_seed(per_hasher_seed: u64, shared_seed: &'static SharedSeed) -> Self
Generates a SeedableRandomState
with the given per-hasher seed
and SharedSeed
.
Trait Implementations§
Source§impl BuildHasher for SeedableRandomState
impl BuildHasher for SeedableRandomState
Source§impl Clone for SeedableRandomState
impl Clone for SeedableRandomState
Source§fn clone(&self) -> SeedableRandomState
fn clone(&self) -> SeedableRandomState
Returns a copy 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 moreSource§impl Debug for SeedableRandomState
impl Debug for SeedableRandomState
Source§impl Default for SeedableRandomState
impl Default for SeedableRandomState
Source§fn default() -> SeedableRandomState
fn default() -> SeedableRandomState
Returns the “default value” for a type. Read more
impl Copy for 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 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