Struct Xoshiro128PlusPlus

pub struct Xoshiro128PlusPlus { /* private fields */ }

A xoshiro128++ random number generator.

The xoshiro128++ algorithm is not suitable for cryptographic purposes, but is very fast and has excellent statistical properties.

The algorithm used here is translated from the xoshiro128plusplus.c reference source code by David Blackman and Sebastiano Vigna.

Trait Implementations

impl Clone for Xoshiro128PlusPlus

fn clone(&self) -> Self

impl Debug for Xoshiro128PlusPlus

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for Xoshiro128PlusPlus

impl PartialEq for Xoshiro128PlusPlus

fn eq(&self, other: &Self) -> bool

impl SeedableRng for Xoshiro128PlusPlus

type Seed = [u8; 16];
fn from_seed(seed: [u8; 16]) -> Xoshiro128PlusPlus

Create a new Xoshiro128PlusPlus. If seed is entirely 0, it will be mapped to a different seed.

fn seed_from_u64(state: u64) -> Self

Create a new Xoshiro128PlusPlus from a u64 seed.

This uses the SplitMix64 generator internally.

impl Serialize for Xoshiro128PlusPlus

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where
    __S: Serializer,

impl StructuralPartialEq for Xoshiro128PlusPlus

impl TryRng for Xoshiro128PlusPlus

type Error = never;
fn try_next_u32(&mut self) -> Result<u32, Infallible>
fn try_next_u64(&mut self) -> Result<u64, Infallible>
fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), Infallible>

impl<'de> Deserialize<'de> for Xoshiro128PlusPlus

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where
    __D: Deserializer<'de>,

Auto Trait Implementations

impl Freeze for Xoshiro128PlusPlus

impl RefUnwindSafe for Xoshiro128PlusPlus

impl Send for Xoshiro128PlusPlus

impl Sync for Xoshiro128PlusPlus

impl Unpin for Xoshiro128PlusPlus

impl UnsafeUnpin for Xoshiro128PlusPlus

impl UnwindSafe for Xoshiro128PlusPlus

Blanket Implementations

impl<R> Rng for Xoshiro128PlusPlus where R: TryRng<Error = never> + ?Sized,

impl<R> RngCore for Xoshiro128PlusPlus where R: Rng,

impl<R> RngExt for Xoshiro128PlusPlus where R: Rng + ?Sized,

impl<R> TryRngCore for Xoshiro128PlusPlus where R: TryRng,

impl<T> Any for Xoshiro128PlusPlus where T: 'static + ?Sized,

impl<T> Borrow<T> for Xoshiro128PlusPlus where T: ?Sized,

impl<T> BorrowMut<T> for Xoshiro128PlusPlus where T: ?Sized,

impl<T> CloneToUninit for Xoshiro128PlusPlus where T: Clone,

impl<T> DeserializeOwned for Xoshiro128PlusPlus where T: for<'de> Deserialize<'de>,

impl<T> From<T> for Xoshiro128PlusPlus

impl<T> ToOwned for Xoshiro128PlusPlus where T: Clone,

impl<T, U> Into<U> for Xoshiro128PlusPlus where U: From<T>,

impl<T, U> TryFrom<U> for Xoshiro128PlusPlus where U: Into<T>,

impl<T, U> TryInto<U> for Xoshiro128PlusPlus where U: TryFrom<T>,