#[non_exhaustive]pub struct UpDownCounter<T>(/* private fields */);
Available on crate feature
metrics
only.Expand description
An instrument that records increasing or decreasing values.
UpDownCounter
can be cloned to create multiple handles to the same instrument. If a UpDownCounter
needs to be shared,
users are recommended to clone the UpDownCounter
instead of creating duplicate UpDownCounter
s for the same metric. Creating
duplicate UpDownCounter
s for the same metric could lower SDK performance.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for UpDownCounter<T>
impl<T: Clone> Clone for UpDownCounter<T>
Source§fn clone(&self) -> UpDownCounter<T>
fn clone(&self) -> UpDownCounter<T>
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 moreAuto Trait Implementations§
impl<T> Freeze for UpDownCounter<T>
impl<T> !RefUnwindSafe for UpDownCounter<T>
impl<T> Send for UpDownCounter<T>
impl<T> Sync for UpDownCounter<T>
impl<T> Unpin for UpDownCounter<T>
impl<T> !UnwindSafe for UpDownCounter<T>
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> ⓘ
Available on crate feature
trace
only.Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Available on crate feature
trace
only.