[][src]Struct fair::games::video_poker::ProvablyFairRNG

pub struct ProvablyFairRNG<T> { /* fields omitted */ }

Methods

impl<T> ProvablyFairRNG<T>[src]

Examples

For byte mode:

use fair::ProvablyFairRNG;
let client_seed = "some client seed";
let server_seed = "some server seed";
let nonce = 1;
let mut rng: ProvablyFairRNG<u8> = ProvablyFairRNG::new(client_seed, server_seed, nonce);
// this is an inifinite iterator, it never returns None
println!("{}", rng.next().unwrap())

For float mode:

use fair::ProvablyFairRNG;
let client_seed = "some client seed";
let server_seed = "some server seed";
let nonce = 1;
let mut rng: ProvablyFairRNG<f64> = ProvablyFairRNG::new(client_seed, server_seed, nonce);
// this is an inifinite iterator, it never returns None
println!("{}", rng.next().unwrap())

pub fn from_config(config: ProvablyFairConfig) -> ProvablyFairRNG<T>[src]

pub fn new(
    client_seed: &str,
    server_seed: &str,
    nonce: u64
) -> ProvablyFairRNG<T>
[src]

impl ProvablyFairRNG<f64>[src]

pub fn range(&mut self, start: usize, end: usize) -> usize[src]

Trait Implementations

impl Iterator for ProvablyFairRNG<f64>[src]

type Item = f64

The type of the elements being iterated over.

impl Iterator for ProvablyFairRNG<u8>[src]

type Item = u8

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> RefUnwindSafe for ProvablyFairRNG<T> where
    T: RefUnwindSafe

impl<T> Send for ProvablyFairRNG<T> where
    T: Send

impl<T> Sync for ProvablyFairRNG<T> where
    T: Sync

impl<T> Unpin for ProvablyFairRNG<T> where
    T: Unpin

impl<T> UnwindSafe for ProvablyFairRNG<T> where
    T: UnwindSafe

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> Same<T> for T

type Output = T

Should always be Self

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.