pub struct AFLocalCounter<T: 'static + MayFlush, V: CounterWithValueType, D: CounterDelegator<T, V>> { /* private fields */ }
Expand description

Auto flush-able local counter

Implementations

Construct a new AFLocalCounter from delegator.

Auto flush-able local counter

Increase the given value to the local counter, and try to flush to global

Panics

Panics in debug build if the value is < 0.

Increase the local counter by 1, and try to flush to global.

Return the local counter value.

Restart the counter, resetting its value back to 0.

trigger flush of LocalKey

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.