Struct mz_ore::metrics::DeleteOnDropGauge
source · pub struct DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,{ /* private fields */ }
Available on crate feature
metrics
only.Expand description
A GenericGauge
wrapper that deletes its labels from the vec when it 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.
Methods from Deref<Target = GenericGauge<P>>§
sourcepub fn add(&self, v: <P as Atomic>::T)
pub fn add(&self, v: <P as Atomic>::T)
Add the given value to the gauge. (The value can be negative, resulting in a decrement of the gauge.)
Trait Implementations§
source§impl<'a, P, L> Borrow<GenericGauge<P>> for DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,
impl<'a, P, L> Borrow<GenericGauge<P>> for DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,
source§fn borrow(&self) -> &GenericGauge<P>
fn borrow(&self) -> &GenericGauge<P>
Immutably borrows from an owned value. Read more
source§impl<'a, P, L> Debug for DeleteOnDropGauge<'a, P, L>
impl<'a, P, L> Debug for DeleteOnDropGauge<'a, P, L>
source§impl<'a, P, L> Deref for DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,
impl<'a, P, L> Deref for DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,
§type Target = GenericGauge<P>
type Target = GenericGauge<P>
The resulting type after dereferencing.
source§fn deref(&self) -> &GenericGauge<P>
fn deref(&self) -> &GenericGauge<P>
Dereferences the value.
source§impl<'a, P, L> Drop for DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,
impl<'a, P, L> Drop for DeleteOnDropGauge<'a, P, L>where
P: Atomic,
L: PromLabelsExt<'a>,
Auto Trait Implementations§
impl<'a, P, L> Freeze for DeleteOnDropGauge<'a, P, L>where
L: Freeze,
impl<'a, P, L> !RefUnwindSafe for DeleteOnDropGauge<'a, P, L>
impl<'a, P, L> Send for DeleteOnDropGauge<'a, P, L>where
L: Send,
impl<'a, P, L> Sync for DeleteOnDropGauge<'a, P, L>where
L: Sync,
impl<'a, P, L> Unpin for DeleteOnDropGauge<'a, P, L>where
L: Unpin,
impl<'a, P, L> !UnwindSafe for DeleteOnDropGauge<'a, P, 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> 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