pub struct Rng { /* private fields */ }Implementations§
Source§impl Rng
impl Rng
pub fn new(seed: u32) -> Self
pub fn seed(&self, value: u32)
pub fn rand(&self) -> f32
pub fn bool(&self) -> bool
pub fn range_i32(&self, min: i32, max: i32) -> i32
pub fn range_f32(&self, min: f32, max: f32) -> f32
pub fn range_u8(&self, min: u8, max: u8) -> u8
pub fn range_usize(&self, min: usize, max: usize) -> usize
pub fn range_u32(&self, min: u32, max: u32) -> u32
pub fn u8(&self, max: u8) -> u8
pub fn usize(&self, max: usize) -> usize
pub fn u32(&self, max: u32) -> u32
pub fn shuffle<T>(&self, slice: &mut [T])
Auto Trait Implementations§
impl !Freeze for Rng
impl !RefUnwindSafe for Rng
impl Send for Rng
impl !Sync for Rng
impl Unpin for Rng
impl UnwindSafe for Rng
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