pub(crate) struct RuneState {
pub(crate) slots: [RuneSlotState; 6],
pub(crate) updated_at: SimTime,
}Fields§
§slots: [RuneSlotState; 6]§updated_at: SimTimeImplementations§
Source§impl RuneState
impl RuneState
pub(crate) fn reset_to(&mut self, full: usize, now: SimTime)
pub(crate) fn full_count(&self) -> usize
pub(crate) fn regenerating_count(&self) -> usize
pub(crate) fn consume(&mut self, count: usize) -> bool
pub(crate) fn fill(&mut self, count: usize)
pub(crate) fn advance(&mut self, elapsed_work: f64)
pub(crate) fn time_to_regen( &self, needed: usize, rate_multiplier: f64, ) -> Option<f64>
fn next_rune_to_fill(&self) -> Option<usize>
fn start_depleted(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuneState
impl RefUnwindSafe for RuneState
impl Send for RuneState
impl Sync for RuneState
impl Unpin for RuneState
impl UnsafeUnpin for RuneState
impl UnwindSafe for RuneState
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more