[][src]Struct rand_otp::Otp

pub struct Otp<R>(_);

Methods

impl<R: Read> Otp<R>[src]

A "random number generator" which reads from a source.

This is useful for crypto with a one-time-pad or for situations where you want to control the sequence of generated numbers.

Integers read from this RNG are read little-endian from the underlying source.

pub fn new(source: R) -> Self[src]

Trait Implementations

impl<R: Read> RngCore for Otp<R>[src]

Auto Trait Implementations

impl<R> Send for Otp<R> where
    R: Send

impl<R> Sync for Otp<R> where
    R: Sync

impl<R> Unpin for Otp<R> where
    R: Unpin

impl<R> UnwindSafe for Otp<R> where
    R: UnwindSafe

impl<R> RefUnwindSafe for Otp<R> where
    R: RefUnwindSafe

Blanket Implementations

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 = !

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.

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

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

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

impl<R> Rng for R where
    R: RngCore + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,