Struct mz_ore::metrics::delete_on_drop::DeleteOnDropMetric
source · pub struct DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,{
inner: V::M,
labels: L,
vec: V,
_phantom: &'a PhantomData<()>,
}
Available on crate feature
metrics
only.Expand description
A Metric
wrapper that deletes its labels from the vec when it is dropped.
It adds a method to create a concrete metric from the vector that gets removed from the vector when the concrete metric is dropped.
NOTE: This type implements Borrow
, which imposes some constraints on implementers. To
ensure these constraints, do not implement any of the Eq
, Ord
, or Hash
traits on this.
type.
Fields§
§inner: V::M
§labels: L
§vec: V
§_phantom: &'a PhantomData<()>
Implementations§
source§impl<'a, V, L> DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,
impl<'a, V, L> DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,
fn from_metric_vector(vec: V, labels: L) -> Self
Trait Implementations§
source§impl<'a, V, L> Clone for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> Clone for DeleteOnDropMetric<'a, V, L>
source§fn clone(&self) -> DeleteOnDropMetric<'a, V, L>
fn clone(&self) -> DeleteOnDropMetric<'a, V, L>
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<'a, V, L> Debug for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> Debug for DeleteOnDropMetric<'a, V, L>
source§impl<'a, V, L> Deref for DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,
impl<'a, V, L> Deref for DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,
source§impl<'a, V, L> Drop for DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,
impl<'a, V, L> Drop for DeleteOnDropMetric<'a, V, L>where
V: MetricVec_,
L: PromLabelsExt<'a>,
Auto Trait Implementations§
impl<'a, V, L> Freeze for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> RefUnwindSafe for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> Send for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> Sync for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> Unpin for DeleteOnDropMetric<'a, V, L>
impl<'a, V, L> UnwindSafe for DeleteOnDropMetric<'a, V, L>
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request