pub struct CancellationToken { /* private fields */ }Expand description
Cooperative cancellation shared by one Module Instance generation.
Implementations§
Source§impl CancellationToken
impl CancellationToken
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns whether cancellation has been requested.
Sourcepub fn cancelled(&self) -> LocalBoxFuture<'static, ()>
pub fn cancelled(&self) -> LocalBoxFuture<'static, ()>
Waits until cancellation is requested.
Trait Implementations§
Source§impl Clone for CancellationToken
impl Clone for CancellationToken
Source§fn clone(&self) -> CancellationToken
fn clone(&self) -> CancellationToken
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 moreSource§impl Debug for CancellationToken
impl Debug for CancellationToken
Auto Trait Implementations§
impl !RefUnwindSafe for CancellationToken
impl !Send for CancellationToken
impl !Sync for CancellationToken
impl !UnwindSafe for CancellationToken
impl Freeze for CancellationToken
impl Unpin for CancellationToken
impl UnsafeUnpin for CancellationToken
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