pub struct EffectStatus {
pub spec: EffectSpec,
pub remaining_seconds: f64,
pub stacks: u8,
pub periodic_elapsed_seconds: Option<f64>,
}Expand description
A copied view of one active effect; editing it cannot change the set.
Times retain the simulation’s f64 precision. See the module example
for inspection alongside periodic pulses.
Fields§
§spec: EffectSpecThe currently applied specification. Its duration is the last accepted specification’s duration, not the effect’s age or total lifetime.
remaining_seconds: f64Simulation seconds until expiry. This may exceed spec.seconds after a
duration refresh or reapplication of a shorter specification.
stacks: u8Number of active stacks, including the first application.
periodic_elapsed_seconds: Option<f64>Elapsed seconds in the current pulse interval, or None for a
nonperiodic effect. Refreshes preserve this phase.
Implementations§
Source§impl EffectStatus
impl EffectStatus
Sourcepub fn periodic_progress(&self) -> Option<f64>
pub fn periodic_progress(&self) -> Option<f64>
Fraction of the current pulse interval elapsed, or None for a
nonperiodic effect. Views returned by the set yield a value in [0, 1).
Sourcepub fn seconds_until_pulse(&self) -> Option<f64>
pub fn seconds_until_pulse(&self) -> Option<f64>
Seconds to the next pulse boundary, or None for a nonperiodic effect.
This does not guarantee another pulse: the effect may expire first.
Inspection does not advance time or consume a pulse.
Trait Implementations§
Source§impl Clone for EffectStatus
impl Clone for EffectStatus
Source§fn clone(&self) -> EffectStatus
fn clone(&self) -> EffectStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more