Trait artichoke_backend::core::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>; }
Expand description

Interpreter global psuedorandom number generator.

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

Associated Types

Concrete type for PRNG errors.

Conrete type for the interpreter psuedorandom number generator.

Required methods

Return a shared reference to the interpreter psuedorandom number generator.

Errors

If the PRNG is inaccessible, an error is returned.

Return a mutable reference to the interpreter psuedorandom number generator.

Errors

If the PRNG is inaccessible, an error is returned.

Implementors