pub struct AFLocalCounter<T, V, D>{ /* private fields */ }
Expand description
Auto flush-able local counter
Implementations§
Source§impl<T, V, D> AFLocalCounter<T, V, D>
impl<T, V, D> AFLocalCounter<T, V, D>
Sourcepub fn new(delegator: D) -> AFLocalCounter<T, V, D>
pub fn new(delegator: D) -> AFLocalCounter<T, V, D>
Construct a new AFLocalCounter from delegator.
Source§impl<T, V, D> AFLocalCounter<T, V, D>
impl<T, V, D> AFLocalCounter<T, V, D>
Auto flush-able local counter
Sourcepub fn inc_by(&self, v: <<V as CounterWithValueType>::ValueType as Atomic>::T)
pub fn inc_by(&self, v: <<V as CounterWithValueType>::ValueType as Atomic>::T)
Increase the given value to the local counter, and try to flush to global
§Panics
Panics in debug build if the value is < 0.
Trait Implementations§
Auto Trait Implementations§
impl<T, V, D> Freeze for AFLocalCounter<T, V, D>where
D: Freeze,
impl<T, V, D> !RefUnwindSafe for AFLocalCounter<T, V, D>
impl<T, V, D> Send for AFLocalCounter<T, V, D>
impl<T, V, D> Sync for AFLocalCounter<T, V, D>
impl<T, V, D> Unpin for AFLocalCounter<T, V, D>
impl<T, V, D> UnwindSafe for AFLocalCounter<T, V, D>
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