pub struct CancelToken { /* private fields */ }Expand description
A clonable cancellation handle. Clones share one underlying flag, so a worker thread can hold a clone and cancel a run executing on another thread.
Implementations§
Source§impl CancelToken
impl CancelToken
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether cancellation has been requested.
Trait Implementations§
Source§impl Clone for CancelToken
impl Clone for CancelToken
Source§impl Debug for CancelToken
impl Debug for CancelToken
Auto Trait Implementations§
impl Freeze 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