pub struct GenericCounter<P: Atomic>(/* private fields */);Implementations§
Source§impl<P: Atomic> GenericCounter<P>
impl<P: Atomic> GenericCounter<P>
pub fn new_some(inner: GenericCounter<P>) -> Self
pub fn new_none() -> Self
pub fn new(name: &str, help: &str) -> Result<Self>
pub fn with_opts(opts: Opts) -> Result<Self>
pub fn get(&self) -> P::T
pub fn inc(&self)
pub fn inc_by(&self, v: <P as Atomic>::T)
pub fn reset(&self)
Trait Implementations§
Source§impl<P: Atomic> Clone for GenericCounter<P>
impl<P: Atomic> Clone for GenericCounter<P>
Source§impl<P: Atomic> Collector for GenericCounter<P>
impl<P: Atomic> Collector for GenericCounter<P>
Auto Trait Implementations§
impl<P> Freeze for GenericCounter<P>
impl<P> RefUnwindSafe for GenericCounter<P>where
P: RefUnwindSafe,
impl<P> Send for GenericCounter<P>
impl<P> Sync for GenericCounter<P>
impl<P> Unpin for GenericCounter<P>
impl<P> UnsafeUnpin for GenericCounter<P>
impl<P> UnwindSafe for GenericCounter<P>where
P: RefUnwindSafe,
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