[][src]Trait artichoke_core::prng::Prng

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

Concrete type for PRNG errors.

type Prng

Conrete type for the interpreter psuedorandom number generator.

Loading content...

Required methods

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

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>

Return a mutable reference to the interpreter psuedorandom number generator.

Errors

If the PRNG is inaccessible, an error is returned.

Loading content...

Implementors

Loading content...