Struct raii_counter::CounterBuilder[][src]

pub struct CounterBuilder { /* fields omitted */ }

A builder for the Counter.

Implementations

impl CounterBuilder[src]

pub fn size(self, v: usize) -> Self[src]

Change the specified size of the new Counter. This counter will add size to the count, and will remove size from the count when dropped.

pub fn create_notify(&mut self) -> NotifyHandle[src]

Create a NotifyHandle with a link to the count of this object. This NotifyHandle will be notified when the value of this count changes.

NotifyHandles cannot be associated after creation, since all linked Counter / WeakCounters cannot be accounted for.

pub fn build(self) -> Counter[src]

Create a new Counter.

Trait Implementations

impl Default for CounterBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.