pub struct CheckpointSeverityState { /* private fields */ }Expand description
ADR-091 severity ladder state, carried across ticks by the caller
alongside TruncateState. Pure state machine: no I/O, no logging —
callers turn the returned emissions into tracing calls.
Implementations§
Source§impl CheckpointSeverityState
impl CheckpointSeverityState
Sourcepub fn observe_wal_pages(
&mut self,
wal_pages: u64,
config: &CheckpointConfig,
) -> Vec<CheckpointSeverityEmission>
pub fn observe_wal_pages( &mut self, wal_pages: u64, config: &CheckpointConfig, ) -> Vec<CheckpointSeverityEmission>
Advance the severity ladder by one observed tick and return every
rung crossed on this tick (zero, one, or two emissions: a fresh
elevation episode can produce INFO and, if warn_sustained_cycles
is 1, WARN on the very same tick).
A below-warn tick resets both the consecutive-cycle counter and the
per-episode WARN latch, re-arming INFO/WARN for a later episode.
Skipped ticks must not be passed here at all — the caller only calls
this on CheckpointTick::Observed, matching the existing
threshold-crossing WARN’s skip-leaves-state-unchanged rule.
Trait Implementations§
Source§impl Clone for CheckpointSeverityState
impl Clone for CheckpointSeverityState
Source§fn clone(&self) -> CheckpointSeverityState
fn clone(&self) -> CheckpointSeverityState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CheckpointSeverityState
impl Debug for CheckpointSeverityState
Source§impl Default for CheckpointSeverityState
impl Default for CheckpointSeverityState
Source§fn default() -> CheckpointSeverityState
fn default() -> CheckpointSeverityState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CheckpointSeverityState
impl RefUnwindSafe for CheckpointSeverityState
impl Send for CheckpointSeverityState
impl Sync for CheckpointSeverityState
impl Unpin for CheckpointSeverityState
impl UnsafeUnpin for CheckpointSeverityState
impl UnwindSafe for CheckpointSeverityState
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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