Trait SeededCore

Source
pub trait SeededCore: TurboCore {
    type Seed;

    // 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§

Source

type Seed

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

Required Methods§

Source

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

Creates a new SeededCore with a specific seed value.

Source

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

Reseeds the SeededCore with a new seed/state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§