Trait artichoke::prelude::Prng[][src]

pub trait Prng {
    type Error;
    type Prng;
    fn prng(&self) -> Result<&Self::Prng, Self::Error>;
fn prng_mut(&mut self) -> Result<&mut Self::Prng, Self::Error>; }

Interpreter global psuedorandom number generator.

Implementors of this trait back the Random::DEFAULT PRNG.

Associated Types

type Error[src]

Concrete type for PRNG errors.

type Prng[src]

Conrete type for the interpreter psuedorandom number generator.

Loading content...

Required methods

fn prng(&self) -> Result<&Self::Prng, Self::Error>[src]

Return a shared reference to the interpreter psuedorandom number generator.

Errors

If the PRNG is inaccessible, an error is returned.

fn prng_mut(&mut self) -> Result<&mut Self::Prng, Self::Error>[src]

Return a mutable reference to the interpreter psuedorandom number generator.

Errors

If the PRNG is inaccessible, an error is returned.

Loading content...

Implementors

impl Prng for Artichoke[src]

type Error = Error

type Prng = Random

pub fn prng(
    &self
) -> Result<&<Artichoke as Prng>::Prng, <Artichoke as Prng>::Error>
[src]

pub fn prng_mut(
    &mut self
) -> Result<&mut <Artichoke as Prng>::Prng, <Artichoke as Prng>::Error>
[src]

Loading content...