pub struct StatsHandle { /* private fields */ }Expand description
Tier-scoped wrapper around Stats. What crate::Client::with_stats and
crate::Server::with_stats accept. Cheap to clone.
Implementations§
Source§impl StatsHandle
impl StatsHandle
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
A no-op handle. See Stats::disabled.
Sourcepub fn broadcast(&self, path: impl AsPath) -> BroadcastStats
pub fn broadcast(&self, path: impl AsPath) -> BroadcastStats
Returns a per-broadcast handle scoped to this tier. Cheap; level state is created lazily and cached.
Paths under the aggregator’s configured prefix return an empty handle
whose bumps are no-ops. This keeps stats traffic from feeding back into
the aggregator.
Trait Implementations§
Source§impl Clone for StatsHandle
impl Clone for StatsHandle
Source§fn clone(&self) -> StatsHandle
fn clone(&self) -> StatsHandle
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 StatsHandle
impl RefUnwindSafe for StatsHandle
impl Send for StatsHandle
impl Sync for StatsHandle
impl Unpin for StatsHandle
impl UnsafeUnpin for StatsHandle
impl UnwindSafe for StatsHandle
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