pub trait SeededCore: TurboCore {
    type Seed: Sized;

    // Required methods
    fn with_seed(seed: Self::Seed) -> Self;
    fn reseed(&self, seed: Self::Seed);
}
Expand description

Trait for implementing Seedable PRNGs, requiring that the PRNG implements TurboCore as a baseline. Seeds must be Sized in order to be used as the internal state of a PRNG.

Required Associated Types§

type Seed: Sized

Associated type for accepting valid Seed values. Must be Sized.

Required Methods§

fn with_seed(seed: Self::Seed) -> Self

Creates a new SeededCore with a specific seed value.

fn reseed(&self, seed: Self::Seed)

Reseeds the SeededCore with a new seed/state.

Object Safety§

This trait is not object safe.

Implementors§

§

impl SeededCore for Rng

§

type Seed = u64