pub struct AccumulatedRng {
base_chance: f64,
cap: u32,
initial_count: u32,
attempt_count: u32,
}Expand description
State for chance-times-attempt-count RNG with an optional guaranteed cap.
Fields§
§base_chance: f64§cap: u32§initial_count: u32§attempt_count: u32Implementations§
Trait Implementations§
Source§impl Clone for AccumulatedRng
impl Clone for AccumulatedRng
Source§fn clone(&self) -> AccumulatedRng
fn clone(&self) -> AccumulatedRng
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccumulatedRng
impl Debug for AccumulatedRng
impl Copy for AccumulatedRng
Auto Trait Implementations§
impl Freeze for AccumulatedRng
impl RefUnwindSafe for AccumulatedRng
impl Send for AccumulatedRng
impl Sync for AccumulatedRng
impl Unpin for AccumulatedRng
impl UnsafeUnpin for AccumulatedRng
impl UnwindSafe for AccumulatedRng
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