pub struct ContinuousRng { /* private fields */ }Expand description
A continuous random number generator that works in no-std contexts.
Implementations§
Source§impl ContinuousRng
impl ContinuousRng
Sourcepub fn new(seed: [u8; 32]) -> ContinuousRng
pub fn new(seed: [u8; 32]) -> ContinuousRng
Creates a new instance of the random number generator from the seed.
Sourcepub fn value<T: Randomizable>(&mut self) -> T
pub fn value<T: Randomizable>(&mut self) -> T
Generates a random value of the Randomizable type T.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContinuousRng
impl RefUnwindSafe for ContinuousRng
impl Send for ContinuousRng
impl Sync for ContinuousRng
impl Unpin for ContinuousRng
impl UnsafeUnpin for ContinuousRng
impl UnwindSafe for ContinuousRng
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> 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