pub struct CounterBuilder { /* private fields */ }
Expand description
A builder for the Counter
.
Implementations§
Source§impl CounterBuilder
impl CounterBuilder
Sourcepub fn size(self, v: usize) -> Self
pub fn size(self, v: usize) -> Self
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.
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CounterBuilder
impl RefUnwindSafe for CounterBuilder
impl Send for CounterBuilder
impl Sync for CounterBuilder
impl Unpin for CounterBuilder
impl UnwindSafe for CounterBuilder
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