pub struct MetricSet { /* private fields */ }
Implementations§
Source§impl MetricSet
impl MetricSet
pub fn new() -> Self
pub fn merge(&mut self, other: &MetricSet)
pub fn add_labels(&mut self, name: &'static str, labels: Vec<MetricLabel>)
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 add(&mut self, metric: Metric)
pub fn get(&self, name: &'static str) -> Option<&Metric>
pub fn iter(&self) -> impl Iterator<Item = (&'static str, &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
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