pub struct Counted {
pub matched: usize,
pub considered: usize,
pub unavailable: usize,
pub span: Duration,
}Expand description
The outcome of counting a condition over a window of samples.
Fields§
§matched: usizeSamples whose reading met the condition.
considered: usizeSamples that produced a fresh reading at all.
Samples whose reading was unavailable, stale, or warming up.
span: DurationMonotonic span between the oldest and newest sample visited.
Implementations§
Source§impl Counted
impl Counted
Sourcepub const fn window(&self) -> TimeWindow
pub const fn window(&self) -> TimeWindow
The evidence window these counts cover.
Sourcepub const fn sustained(&self, required: usize, minimum: usize) -> bool
pub const fn sustained(&self, required: usize, minimum: usize) -> bool
Whether the condition held often enough, over enough readings, to support a sustained claim (§11.3).
Both halves matter: matched >= required is the sustained condition, and
considered >= minimum is the minimum-sample rule that stops a rule from
firing on the second tick after launch.
Trait Implementations§
impl Copy for Counted
impl Eq for Counted
impl StructuralPartialEq for Counted
Auto Trait Implementations§
impl Freeze for Counted
impl RefUnwindSafe for Counted
impl Send for Counted
impl Sync for Counted
impl Unpin for Counted
impl UnsafeUnpin for Counted
impl UnwindSafe for Counted
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