[−][src]Struct weyl::Rng
Middle Square Weyl Sequence PRNG In other words it generates random numbers.
Methods
impl Rng
[src]
pub fn new() -> Self
[src]
pub fn new_seed(seed: u64) -> Self
[src]
pub fn last_seed(&self) -> u64
[src]
returns the last seed used to initialize the generator
pub fn seed(&mut self, seed: u64)
[src]
reseed the generator
pub fn u64(&mut self) -> u64
[src]
generates a random u64
pub fn f64(&mut self) -> f64
[src]
generates a random f64
pub fn fill(&mut self, bytes: &mut [u8])
[src]
fill bytes slice with random data
Auto Trait Implementations
impl Sync for Rng
impl Send for Rng
impl Unpin for Rng
impl RefUnwindSafe for Rng
impl UnwindSafe for Rng
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,