pub struct MetricsRef { /* private fields */ }Expand description
A cheap, clonable reader of a listener’s metrics (SRV-030).
Observation is split from lifecycle on purpose: a metrics exporter can hold
one of these while the ListenerHandle stays wherever shutdown lives.
Before this existed, a product that wanted both had to wrap the handle in an
Arc — which made graceful stop() unreachable and silently downgraded
shutdown to the fire-and-forget Drop path.
Implementations§
Source§impl MetricsRef
impl MetricsRef
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Point-in-time metrics (SRV-030).
Trait Implementations§
Source§impl Clone for MetricsRef
impl Clone for MetricsRef
Source§fn clone(&self) -> MetricsRef
fn clone(&self) -> MetricsRef
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 moreAuto Trait Implementations§
impl Freeze for MetricsRef
impl RefUnwindSafe for MetricsRef
impl Send for MetricsRef
impl Sync for MetricsRef
impl Unpin for MetricsRef
impl UnsafeUnpin for MetricsRef
impl UnwindSafe for MetricsRef
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