pub struct AeronUnavailableCounterSlot { /* private fields */ }Expand description
A callback you can replace without registering another handler.
Register a clone once, then use set or clear. Clones share the callback.
Old callbacks are freed after their last call. The handler stays registered.
Calls to the same callback run one at a time. It can replace or clear itself,
but calling itself again will deadlock.
A non-empty slot takes two internal mutex locks and clones an Arc per call.
A retained handler adds its own lock, for three lock acquisitions in total.
For updates that can wait for an active callback, use the returned handler’s
lock() instead. This avoids the slot’s locks and per-call Arc clone.
Implementations§
Trait Implementations§
Source§fn clone(&self) -> AeronUnavailableCounterSlot
fn clone(&self) -> AeronUnavailableCounterSlot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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