pub struct Metrics;Expand description
Zero-sized no-op registry. Identical public shape to the real
implementation (see real.rs) so call sites don’t know which
backend they’re hitting.
Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a disabled (no-op) metrics registry. The enabled-OFF
configuration has no fallible initialization, so this returns
Self directly (not Result<Self, _>) to keep call sites
feature-symmetric.
pub fn record_http_request( &self, _method: &str, _path: &str, _status: u16, _elapsed: Duration, )
pub fn record_scanner_cycle(&self, _scanner: &'static str, _elapsed: Duration)
pub fn set_cancel_backlog_depth(&self, _depth: u64)
pub fn record_claim_from_grant(&self, _lane: &str, _elapsed: Duration)
pub fn inc_lease_renewal(&self, _outcome: &'static str)
pub fn inc_attempt_outcome(&self, _lane: &str, _outcome: AttemptOutcome)
pub fn inc_worker_at_capacity(&self)
pub fn inc_budget_hit(&self, _dimension: &str)
pub fn inc_quota_hit(&self, _reason: &'static str)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
impl UnwindSafe for Metrics
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