pub struct HasherRng<H = RandomState> { /* private fields */ }
Expand description
A Rng
implementation that uses a Hasher
to generate the random
values. The implementation uses an internal counter to pass to the hasher
for each iteration of Rng::next_u64
.
§Default
This hasher has a default type of RandomState
which just uses the
libstd method of getting a random u64.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<H> Freeze for HasherRng<H>where
H: Freeze,
impl<H> RefUnwindSafe for HasherRng<H>where
H: RefUnwindSafe,
impl<H> Send for HasherRng<H>where
H: Send,
impl<H> Sync for HasherRng<H>where
H: Sync,
impl<H> Unpin for HasherRng<H>where
H: Unpin,
impl<H> UnwindSafe for HasherRng<H>where
H: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more