Struct raii_counter::WeakCounterBuilder[][src]

pub struct WeakCounterBuilder { /* fields omitted */ }

A builder for the WeakCounter.

Implementations

impl WeakCounterBuilder[src]

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) -> WeakCounter[src]

Create a new WeakCounter. This WeakCounter creates a new count with value: 0 since the WeakCounter has no effect on the count.

Trait Implementations

impl Default for WeakCounterBuilder[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.