pub struct MetricsLogger(/* private fields */);
Expand description
An optional client connection to the Cobalt logging service.
Implementations§
Source§impl MetricsLogger
impl MetricsLogger
pub fn new() -> Self
Sourcepub fn from_proxy(proxy: MetricEventLoggerProxy) -> Self
pub fn from_proxy(proxy: MetricEventLoggerProxy) -> Self
Test-only
Sourcepub fn log_occurrence(&self, id: u32, event_codes: Vec<u32>)
pub fn log_occurrence(&self, id: u32, event_codes: Vec<u32>)
Logs an occurrence metric using the Cobalt logger. Does not block execution.
Sourcepub fn log_integer(&self, id: u32, value: i64, event_codes: Vec<u32>)
pub fn log_integer(&self, id: u32, value: i64, event_codes: Vec<u32>)
Logs an integer metric using the Cobalt logger. Does not block execution.
pub fn log_occurrences<I: 'static + IntoIterator<Item = u32> + Send>( &self, id: u32, event_codes: I, )
Trait Implementations§
Source§impl Clone for MetricsLogger
impl Clone for MetricsLogger
Source§fn clone(&self) -> MetricsLogger
fn clone(&self) -> MetricsLogger
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for MetricsLogger
impl Default for MetricsLogger
Source§fn default() -> MetricsLogger
fn default() -> MetricsLogger
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MetricsLogger
impl !RefUnwindSafe for MetricsLogger
impl Send for MetricsLogger
impl Sync for MetricsLogger
impl Unpin for MetricsLogger
impl !UnwindSafe for MetricsLogger
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)