Struct opentelemetry::metrics::UpDownCounter
source · #[non_exhaustive]pub struct UpDownCounter<T>(/* private fields */);
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
)