pub struct AtomicObservableCounterU64(/* private fields */);
Expand description
Observable counter based on std::sync::atomic::AtomicU64.
Implementations§
source§impl AtomicObservableCounterU64
impl AtomicObservableCounterU64
sourcepub fn new(
meter: &Meter,
name: impl Into<Cow<'static, str>>,
initial_value: u64,
) -> AtomicObservableInstrumentBuilder<'_, AtomicObservableCounterU64, ObservableCounter<u64>, u64>
pub fn new( meter: &Meter, name: impl Into<Cow<'static, str>>, initial_value: u64, ) -> AtomicObservableInstrumentBuilder<'_, AtomicObservableCounterU64, ObservableCounter<u64>, u64>
Construct a new AtomicObservableCounterU64, and associated opentelemetry metric. Note: If you would like any attributes applied to the metric reporting, please set them with the versioned_meter api before passing the meter into this constructor.
Trait Implementations§
source§impl Clone for AtomicObservableCounterU64
impl Clone for AtomicObservableCounterU64
source§fn clone(&self) -> AtomicObservableCounterU64
fn clone(&self) -> AtomicObservableCounterU64
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 Freeze for AtomicObservableCounterU64
impl !RefUnwindSafe for AtomicObservableCounterU64
impl Send for AtomicObservableCounterU64
impl Sync for AtomicObservableCounterU64
impl Unpin for AtomicObservableCounterU64
impl !UnwindSafe for AtomicObservableCounterU64
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