Struct metrics_util::debugging::DebuggingRecorder
source · pub struct DebuggingRecorder { /* private fields */ }
Available on crate feature
debugging
only.Expand description
A simplistic recorder that can be installed and used for debugging or testing.
Callers can easily take snapshots of the metrics at any given time and get access to the raw values.
Implementations§
source§impl DebuggingRecorder
impl DebuggingRecorder
sourcepub fn new() -> DebuggingRecorder
pub fn new() -> DebuggingRecorder
Creates a new DebuggingRecorder
.
sourcepub fn snapshotter(&self) -> Snapshotter
pub fn snapshotter(&self) -> Snapshotter
Gets a Snapshotter
attached to this recorder.
sourcepub fn install(self) -> Result<(), SetRecorderError<Self>>
pub fn install(self) -> Result<(), SetRecorderError<Self>>
Installs this recorder as the global recorder.
Trait Implementations§
source§impl Default for DebuggingRecorder
impl Default for DebuggingRecorder
source§impl Recorder for DebuggingRecorder
impl Recorder for DebuggingRecorder
source§fn describe_counter(
&self,
key: KeyName,
unit: Option<Unit>,
description: SharedString
)
fn describe_counter( &self, key: KeyName, unit: Option<Unit>, description: SharedString )
Describes a counter. Read more
source§fn describe_gauge(
&self,
key: KeyName,
unit: Option<Unit>,
description: SharedString
)
fn describe_gauge( &self, key: KeyName, unit: Option<Unit>, description: SharedString )
Describes a gauge. Read more
source§fn describe_histogram(
&self,
key: KeyName,
unit: Option<Unit>,
description: SharedString
)
fn describe_histogram( &self, key: KeyName, unit: Option<Unit>, description: SharedString )
Describes a histogram. Read more
Auto Trait Implementations§
impl Freeze for DebuggingRecorder
impl RefUnwindSafe for DebuggingRecorder
impl Send for DebuggingRecorder
impl Sync for DebuggingRecorder
impl Unpin for DebuggingRecorder
impl UnwindSafe for DebuggingRecorder
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