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§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
)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