Struct Seed
pub struct Seed(/* private fields */);Implementations§
§impl Seed
impl Seed
pub fn new(seed: u64) -> Seed
pub fn with_ts(&self, ts: u64) -> u64
pub fn with_fight_draw(&self, n: u64) -> u64
pub fn with_fight_draw(&self, n: u64) -> u64
Stream key for the n-th draw of a fight-scoped RNG.
with_ts is plain addition, so any two (seed, ts) pairs with the same
sum share a stream. A fight’s draws form a second seed space that runs
alongside the session’s, so they mix rather than add — otherwise a fight
seed could land on the session’s stream and replay the same rolls.
Trait Implementations§
impl Eq for Seed
impl StructuralPartialEq for Seed
Auto Trait Implementations§
impl Freeze for Seed
impl RefUnwindSafe for Seed
impl Send for Seed
impl Sync for Seed
impl Unpin for Seed
impl UnwindSafe for Seed
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more