pub struct RingBufferStopCallback {
_inner: Arc<Mutex<RingBufferStopCallbackInner>>,
}Expand description
RingBufferStopCallback wraps a callback. The callback will be invoked when last instance of RingBufferStopCallback and its clones is dropped.
The callback might not be invoked in certain cases. Don’t depend this for safety.
Fields§
§_inner: Arc<Mutex<RingBufferStopCallbackInner>>Implementations§
Source§impl RingBufferStopCallback
impl RingBufferStopCallback
Sourcepub fn new<C: 'static + FnMut() + Send>(cb: C) -> RingBufferStopCallback
pub fn new<C: 'static + FnMut() + Send>(cb: C) -> RingBufferStopCallback
Create new callback from closure.
Trait Implementations§
Source§impl Clone for RingBufferStopCallback
impl Clone for RingBufferStopCallback
Source§fn clone(&self) -> RingBufferStopCallback
fn clone(&self) -> RingBufferStopCallback
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RingBufferStopCallback
impl RefUnwindSafe for RingBufferStopCallback
impl Send for RingBufferStopCallback
impl Sync for RingBufferStopCallback
impl Unpin for RingBufferStopCallback
impl UnwindSafe for RingBufferStopCallback
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