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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes