[][src]Struct smoke::R

pub struct R(_, _);

A pseudo random generator at a given time

it can created from seed using R::from_seed, or from another pseudo random generator using .sub() as to create a hierarchy (or a tree) of generator.

Implementations

impl R[src]

pub fn new() -> (Seed, Self)[src]

pub fn sub(&mut self) -> Self[src]

pub fn from_seed(seed: Seed) -> Self[src]

pub fn next_bytes(&mut self, buf: &mut [u8])[src]

pub fn ascii(&mut self) -> char[src]

pub fn codepoint(&mut self) -> char[src]

pub fn bool(&mut self) -> bool[src]

pub fn num<T: NumPrimitive>(&mut self) -> T[src]

pub fn num_range<T: NumPrimitive>(&mut self, min_value: T, max_value: T) -> T[src]

pub fn array_num<T: NumPrimitive>(&mut self, buf: &mut [T])[src]

pub fn array_num_range<T: NumPrimitive>(
    &mut self,
    min_value: T,
    max_value: T,
    buf: &mut [T]
)
[src]

Auto Trait Implementations

impl RefUnwindSafe for R

impl Send for R

impl Sync for R

impl Unpin for R

impl UnwindSafe for R

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.