pub struct MetricSet { /* private fields */ }Implementations§
Source§impl MetricSet
impl MetricSet
pub fn new() -> Self
pub fn keys(&self) -> Vec<&'static str>
pub fn flush_all_into(&self, target: &mut MetricSet)
pub fn flush_scope_into(&self, from_scope: MetricScope, target: &mut MetricSet)
pub fn flush_metric_into(&self, name: &'static str, target: &mut MetricSet)
pub fn upsert<'a>( &mut self, name: &'static str, update: impl Into<MetricUpdate<'a>>, )
pub fn add_or_update<'a>(&mut self, metric: Metric)
pub fn iter_scope( &self, scope: MetricScope, ) -> impl Iterator<Item = (&'static str, &Metric)>
pub fn iter_scope_mut( &mut self, scope: MetricScope, ) -> impl Iterator<Item = (&'static str, &mut Metric)>
pub fn iter(&self) -> impl Iterator<Item = (&'static str, &Metric)>
pub fn clear_scope(&mut self, scope: MetricScope)
pub fn add(&mut self, metric: Metric)
pub fn get(&self, name: &'static str) -> Option<&Metric>
pub fn get_from_string(&self, name: String) -> Option<&Metric>
pub fn clear(&mut self)
pub fn contains_key(&self, name: impl Into<String>) -> bool
pub fn len(&self) -> usize
pub fn summary(&self) -> MetricSetSummary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetricSet
impl RefUnwindSafe for MetricSet
impl Send for MetricSet
impl Sync for MetricSet
impl Unpin for MetricSet
impl UnwindSafe for MetricSet
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