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) -> Xoshiro128PlusPlus
impl Debug for Xoshiro128PlusPlus
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Xoshiro128PlusPlus
impl PartialEq for Xoshiro128PlusPlus
fn eq(&self, other: &Xoshiro128PlusPlus) -> bool
impl SeedableRng for Xoshiro128PlusPlus
type Seed = [u8; 16];fn from_seed(seed: [u8; 16]) -> Xoshiro128PlusPlusCreate a new
Xoshiro128PlusPlus. Ifseedis entirely 0, it will be mapped to a different seed.fn seed_from_u64(state: u64) -> SelfCreate a new
Xoshiro128PlusPlusfrom au64seed.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 = Infallible;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 = Infallible> + ?Sized,
fn next_u32(&mut self) -> u32fn next_u64(&mut self) -> u64fn fill_bytes(&mut self, dst: &mut [u8])
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,
type Error = <R as TryRng>::Error;
impl<T> Any for Xoshiro128PlusPlus
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Xoshiro128PlusPlus
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Xoshiro128PlusPlus
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Xoshiro128PlusPlus
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> DeserializeOwned for Xoshiro128PlusPlus
where
T: for<'de> Deserialize<'de>,
impl<T> From<T> for Xoshiro128PlusPlus
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Xoshiro128PlusPlus
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for Xoshiro128PlusPlus
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Xoshiro128PlusPlus
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Xoshiro128PlusPlus
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>