pub struct WeakCounterBuilder { /* private fields */ }
Expand description
A builder for the WeakCounter
.
Implementations§
Source§impl WeakCounterBuilder
impl WeakCounterBuilder
Sourcepub fn create_notify(&mut self) -> NotifyHandle
pub fn create_notify(&mut self) -> NotifyHandle
Create a NotifyHandle
with a link to the count of this object. This NotifyHandle
will
be notified when the value of this count changes.
NotifyHandle
s cannot be associated after creation, since all linked
Counter
/ WeakCounter
s cannot be accounted for.
Sourcepub fn build(self) -> WeakCounter
pub fn build(self) -> WeakCounter
Create a new WeakCounter
. This WeakCounter
creates a new count
with value: 0 since the WeakCounter
has no effect on the count.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WeakCounterBuilder
impl RefUnwindSafe for WeakCounterBuilder
impl Send for WeakCounterBuilder
impl Sync for WeakCounterBuilder
impl Unpin for WeakCounterBuilder
impl UnwindSafe for WeakCounterBuilder
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