pub struct SessionCounters { /* private fields */ }Expand description
One session’s accumulated counts.
Implementations§
Source§impl SessionCounters
impl SessionCounters
Sourcepub fn bump_error(&self, counter: ErrorCounter)
pub fn bump_error(&self, counter: ErrorCounter)
Bump an error counter by one.
Sourcepub fn observe_turn_secs(&self, secs: u64)
pub fn observe_turn_secs(&self, secs: u64)
Record one turn’s wall-clock time in the histogram.
Sourcepub fn record_provider(&self, provider: ProviderKind)
pub fn record_provider(&self, provider: ProviderKind)
Record that a provider was routed to.
Takes a ProviderKind by value, never a &str: the four
persistence and label accessors that look like the natural seam all
return the customer’s own [providers.<name>] table key when the route
is custom, and /status already prints it. ProviderKind::Custom
yields the literal "custom" and nothing else.
Trait Implementations§
Source§impl Debug for SessionCounters
impl Debug for SessionCounters
Source§impl Default for SessionCounters
impl Default for SessionCounters
Source§fn default() -> SessionCounters
fn default() -> SessionCounters
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SessionCounters
impl RefUnwindSafe for SessionCounters
impl Send for SessionCounters
impl Sync for SessionCounters
impl Unpin for SessionCounters
impl UnsafeUnpin for SessionCounters
impl UnwindSafe for SessionCounters
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