pub struct MetricVec<M: MetricType, L: LabelGroupSet> { /* private fields */ }Implementations§
source§impl<M: MetricType, L: LabelGroupSet> MetricVec<M, L>
impl<M: MetricType, L: LabelGroupSet> MetricVec<M, L>
pub fn new_metric_vec(label_set: L, metadata: M::Metadata) -> Self
sourcepub fn new_sparse_metric_vec(label_set: L, metadata: M::Metadata) -> Self
pub fn new_sparse_metric_vec(label_set: L, metadata: M::Metadata) -> Self
Create a new sparse metric vec. Useful if you have a fixed cardinality vec but the cardinality is quite high
pub fn metadata(&self) -> &M::Metadata
pub fn with_labels<'a>(&'a self, label: L::Group<'a>) -> Option<LabelId<L>>
pub fn get_metric<R>( &self, id: LabelId<L>, f: impl for<'a> FnOnce(MetricRef<'a, M>) -> R ) -> R
source§impl<L: LabelGroupSet> MetricVec<CounterState, L>
impl<L: LabelGroupSet> MetricVec<CounterState, L>
pub fn new_counter_vec(label_set: L) -> Self
pub fn new_sparse_counter_vec(label_set: L) -> Self
source§impl<M: MetricType, L: LabelGroupSet> MetricVec<M, L>
impl<M: MetricType, L: LabelGroupSet> MetricVec<M, L>
pub fn collect_into<T>(&self, name: impl MetricName, enc: &mut T)where
M: MetricEncoder<T>,
Auto Trait Implementations§
impl<M, L> !RefUnwindSafe for MetricVec<M, L>
impl<M, L> Send for MetricVec<M, L>
impl<M, L> Sync for MetricVec<M, L>where
L: Sync,
M: Sync + Send,
<M as MetricType>::Metadata: Sync,
<L as LabelGroupSet>::Unique: Sync + Send,
impl<M, L> Unpin for MetricVec<M, L>
impl<M, L> UnwindSafe for MetricVec<M, L>where
L: UnwindSafe,
M: UnwindSafe,
<M as MetricType>::Metadata: UnwindSafe,
<L as LabelGroupSet>::Unique: UnwindSafe,
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