pub struct CancelToken(/* private fields */);Expand description
Cancels a shared-mode call that is waiting for the file’s lock, from
another thread: an iOS background activity’s expiry handler, say. The
call releases every lock it holds and returns MnemoError::Cancelled.
A cancel reaches only a call that is waiting for a lock. Once a call holds the lock it runs to its end, so a write is never cut off part-way.
Clones share one flag. A cancelled token stays cancelled: give the handle
a new one for its next calls (SharedMnemo::set_cancel).
Implementations§
Source§impl CancelToken
impl CancelToken
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether CancelToken::cancel has been called.
Trait Implementations§
Source§impl Clone for CancelToken
impl Clone for CancelToken
Source§impl Debug for CancelToken
impl Debug for CancelToken
Auto Trait Implementations§
impl Forget for CancelToken
impl Freeze for CancelToken
impl Move for CancelToken
impl RefUnwindSafe for CancelToken
impl Send for CancelToken
impl Sync for CancelToken
impl Unpin for CancelToken
impl UnsafeUnpin for CancelToken
impl UnwindSafe for CancelToken
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