pub struct ThreadLocalRand(/* private fields */);
Expand description
A seeded, thread-local Rand
instance.
Trait Implementations§
Source§impl Rand for ThreadLocalRand
impl Rand for ThreadLocalRand
Source§fn next_usize(&mut self) -> usize
fn next_usize(&mut self) -> usize
Returns the next random
usize
.Source§fn next_bool(&mut self, p: Probability) -> bool
fn next_bool(&mut self, p: Probability) -> bool
Source§fn next_lim_u16(&mut self, lim: u16) -> u16
fn next_lim_u16(&mut self, lim: u16) -> u16
Generates a random number in
0..lim
.Source§fn next_lim_u32(&mut self, lim: u32) -> u32
fn next_lim_u32(&mut self, lim: u32) -> u32
Generates a random number in
0..lim
.Source§fn next_lim_u64(&mut self, lim: u64) -> u64
fn next_lim_u64(&mut self, lim: u64) -> u64
Generates a random number in
0..lim
.Source§fn next_lim_u128(&mut self, lim: u128) -> u128
fn next_lim_u128(&mut self, lim: u128) -> u128
Generates a random number in
0..lim
.Source§fn next_lim_usize(&mut self, lim: usize) -> usize
fn next_lim_usize(&mut self, lim: usize) -> usize
Generates a random number in
0..lim
.Auto Trait Implementations§
impl Freeze for ThreadLocalRand
impl !RefUnwindSafe for ThreadLocalRand
impl !Send for ThreadLocalRand
impl !Sync for ThreadLocalRand
impl Unpin for ThreadLocalRand
impl !UnwindSafe for ThreadLocalRand
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