[][src]Trait artichoke_backend::prelude::Prng

pub trait Prng {
    type Error;
    type Prng;
    pub fn prng(&self) -> Result<&Self::Prng, Self::Error>;
pub 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

pub 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.

pub 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

Loading content...