pub struct ThreadRand { /* private fields */ }Implementations§
Source§impl ThreadRand
impl ThreadRand
pub fn get_rng(&mut self) -> &mut Rand
Sourcepub fn mix(&mut self, value: u64)
pub fn mix(&mut self, value: u64)
Mixes the current seed with the provided value.
This mixing operation is particularly useful in no_std environments when you want
to create a PRNG that incorporates external factors or environmental entropy, such
as time, to increase randomness.
Trait Implementations§
Source§impl Clone for ThreadRand
impl Clone for ThreadRand
Source§fn clone(&self) -> ThreadRand
fn clone(&self) -> ThreadRand
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ThreadRand
impl Debug for ThreadRand
Source§impl Default for ThreadRand
impl Default for ThreadRand
Source§fn default() -> ThreadRand
fn default() -> ThreadRand
Returns the “default value” for a type. Read more
Source§impl RngCore for ThreadRand
Available on crate feature std only.
impl RngCore for ThreadRand
Available on crate feature
std only.Source§fn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
Fill
dest with random data. Read moreAuto Trait Implementations§
impl Freeze for ThreadRand
impl !RefUnwindSafe for ThreadRand
impl !Send for ThreadRand
impl !Sync for ThreadRand
impl Unpin for ThreadRand
impl !UnwindSafe for ThreadRand
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)