pub struct SharedSeed { /* private fields */ }
Expand description
A random seed intended to be shared by many different foldhash instances.
This seed is consumed by FoldHasher::with_seed
,
and SeedableRandomState::with_seed
.
Implementations§
Sourcepub fn global_random() -> &'static SharedSeed
pub fn global_random() -> &'static SharedSeed
Returns the globally shared randomly initialized SharedSeed
as used
by RandomState
.
Sourcepub const fn global_fixed() -> &'static SharedSeed
pub const fn global_fixed() -> &'static SharedSeed
Returns the globally shared fixed SharedSeed
as used
by FixedState
.
Sourcepub const fn from_u64(seed: u64) -> Self
pub const fn from_u64(seed: u64) -> Self
Generates a new SharedSeed
from a single 64-bit seed.
Note that this is somewhat expensive so it is suggested to re-use the
SharedSeed
as much as possible, using the per-hasher seed to
differentiate between hash instances.
Trait Implementations§
Source§fn clone(&self) -> SharedSeed
fn clone(&self) -> SharedSeed
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 moreAuto Trait Implementations§
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