pub struct WyRand { /* private fields */ }
Expand description
An instance of the WyRand random number generator. Seeded from the system entropy generator when available. This generator is NOT cryptographically secure.
Implementations§
Trait Implementations§
source§impl Rng<8> for WyRand
impl Rng<8> for WyRand
source§fn rand(&mut self) -> [u8; 8]
fn rand(&mut self) -> [u8; 8]
Generates a random sequence of bytes, seeding from the internal state.
source§fn generate<Generated>(&mut self) -> Generatedwhere
Generated: RandomGen<Self, OUTPUT>,
fn generate<Generated>(&mut self) -> Generatedwhere Generated: RandomGen<Self, OUTPUT>,
Generates a random of the specified type, seeding from the internal state.
source§fn fill_bytes<Bytes>(&mut self, buffer: Bytes)where
Bytes: AsMut<[u8]>,
fn fill_bytes<Bytes>(&mut self, buffer: Bytes)where Bytes: AsMut<[u8]>,
Fill an array of bytes with randomness.
source§fn fill<Contents, Array>(&mut self, target: Array)where
Contents: RandomGen<Self, OUTPUT>,
Array: AsMut<[Contents]>,
fn fill<Contents, Array>(&mut self, target: Array)where Contents: RandomGen<Self, OUTPUT>, Array: AsMut<[Contents]>,
Fill an array with the specified type.
source§fn generate_range<Number, Bounds>(&mut self, range: Bounds) -> Numberwhere
Number: RandomRange<Self, OUTPUT>,
Bounds: RangeBounds<Number>,
fn generate_range<Number, Bounds>(&mut self, range: Bounds) -> Numberwhere Number: RandomRange<Self, OUTPUT>, Bounds: RangeBounds<Number>,
Generates a random of the specified type, seeding from the internal state.
source§fn shuffle<Contents, Array>(&mut self, target: Array)where
Array: AsMut<[Contents]>,
fn shuffle<Contents, Array>(&mut self, target: Array)where Array: AsMut<[Contents]>,
Shuffle a slice, using the RNG.
Auto Trait Implementations§
impl RefUnwindSafe for WyRand
impl Send for WyRand
impl Sync for WyRand
impl Unpin for WyRand
impl UnwindSafe for WyRand
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