pub struct CallbackRef<'a> { /* private fields */ }
Expand description
A reference to the deferred callback.
Implementations§
Source§impl CallbackRef<'_>
impl CallbackRef<'_>
Sourcepub fn replace<F: FnOnce() + Send + Unpin + 'static>(&self, callback: F) -> bool
pub fn replace<F: FnOnce() + Send + Unpin + 'static>(&self, callback: F) -> bool
Replaces the callback with a different callback. Returns true
if successful, or false
if
the existing callback has already been called.
Sourcepub fn replace_waker(&self, waker: &Waker) -> bool
pub fn replace_waker(&self, waker: &Waker) -> bool
Same as replace
but for a waker.
Auto Trait Implementations§
impl<'a> Freeze for CallbackRef<'a>
impl<'a> !RefUnwindSafe for CallbackRef<'a>
impl<'a> Send for CallbackRef<'a>
impl<'a> Sync for CallbackRef<'a>
impl<'a> Unpin for CallbackRef<'a>
impl<'a> !UnwindSafe for CallbackRef<'a>
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