#[non_exhaustive]pub struct StallMemorySnapshot {
pub peak: Duration,
pub age: Duration,
}Expand description
Plain-data snapshot of the stall memory, for session persistence.
Aging semantics. peak is the raw held peak; age is how long ago
(on the controller’s arrival clock) that peak was observed. The
decayed value is peak while age <= hold, then falls linearly to 0 over
decay. A snapshot restored after N seconds of wall time must be aged by
N first: StallMemorySnapshot::aged. The restored memory is anchored
at the first clock reading the new controller sees, so a restore adds no
extra age of its own.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.peak: DurationRaw held peak PDV.
age: DurationAge of that peak.
Implementations§
Source§impl StallMemorySnapshot
impl StallMemorySnapshot
Sourcepub const fn new(peak: Duration, age: Duration) -> Self
pub const fn new(peak: Duration, age: Duration) -> Self
Build a snapshot. The struct is #[non_exhaustive], so a foreign
crate or FFI wrapper cannot use a struct literal: this const fn is
the constructor (usable in const/static context; Default is the
empty memory and the fields stay public for reading).