Struct seeded_random::Seed
source · pub struct Seed(_);Expand description
This encapsulates the RNG seed into a separate, uncopyable, and uncloneable value so it can not be accidentally propagated to another RNG without understanding the implication of reusing seeds.
Implementations§
source§impl Seed
impl Seed
sourcepub fn unsafe_new(seed: u64) -> Self
pub fn unsafe_new(seed: u64) -> Self
If you absolutely need to create a new seed from a raw value, use this function. It’s “unsafe” not because of memory reasons but because blindly reusing seed values can get you into tough-to-troubleshoot situations.
It’s better to generate new seeds and new RNGs from those seeds.