pub struct CounterHandle { /* private fields */ }
Expand description
Handle for efficient counter operations
Implementations§
Source§impl CounterHandle
impl CounterHandle
Sourcepub fn increment_by(&self, amount: u64) -> MetricsResult<u64>
pub fn increment_by(&self, amount: u64) -> MetricsResult<u64>
Increment the counter by a specific amount
Trait Implementations§
Source§impl Clone for CounterHandle
impl Clone for CounterHandle
Source§fn clone(&self) -> CounterHandle
fn clone(&self) -> CounterHandle
Returns a duplicate 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 CounterHandle
impl !RefUnwindSafe for CounterHandle
impl Send for CounterHandle
impl Sync for CounterHandle
impl Unpin for CounterHandle
impl !UnwindSafe for CounterHandle
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