Struct urandom::rng::Xoshiro256
source · pub struct Xoshiro256 { /* private fields */ }
Expand description
This is xoshiro256 1.0, one of our all-purpose, rock-solid generators.
It has excellent (sub-ns) speed, a state (256 bits) that is large enough for any parallel application, and it passes all tests we are aware of.
The state must be seeded so that it is not everywhere zero. If you have a 64-bit seed, we suggest to seed a SplitMix64 generator and use its output to fill s.
Examples
let mut rng = urandom::rng::Xoshiro256::new();
let value: i32 = rng.next();
Implementations
sourceimpl Xoshiro256
impl Xoshiro256
sourcepub fn new() -> Random<Xoshiro256>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
pub fn new() -> Random<Xoshiro256>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
Creates a new instance seeded securely from system entropy.
See the SeedRng
trait for more information.
Trait Implementations
sourceimpl Clone for Xoshiro256
impl Clone for Xoshiro256
sourcefn clone(&self) -> Xoshiro256
fn clone(&self) -> Xoshiro256
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for Xoshiro256
impl Debug for Xoshiro256
sourceimpl Rng for Xoshiro256
impl Rng for Xoshiro256
sourceimpl SeedRng for Xoshiro256
impl SeedRng for Xoshiro256
sourcefn new() -> Random<Xoshiro256>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
fn new() -> Random<Xoshiro256>ⓘNotable traits for Random<R>impl<R: Rng> Read for Random<R>
Creates a new instance seeded securely from system entropy. Read more
Auto Trait Implementations
impl RefUnwindSafe for Xoshiro256
impl Send for Xoshiro256
impl Sync for Xoshiro256
impl Unpin for Xoshiro256
impl UnwindSafe for Xoshiro256
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more