pub struct Cancellation(/* private fields */);Expand description
Whether the host asked to stop work on a call, and a way to wait until it does. Clones share one state: a cancel through any of them is seen by all.
Implementations§
Source§impl Cancellation
impl Cancellation
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether the call was cancelled.
Sourcepub fn cancel(&self)
pub fn cancel(&self)
Cancels the call and wakes everything waiting in
Cancellation::wait.
Trait Implementations§
Source§impl Clone for Cancellation
impl Clone for Cancellation
Source§impl Debug for Cancellation
impl Debug for Cancellation
Auto Trait Implementations§
impl Forget for Cancellation
impl Freeze for Cancellation
impl Move for Cancellation
impl RefUnwindSafe for Cancellation
impl Send for Cancellation
impl Sync for Cancellation
impl Unpin for Cancellation
impl UnsafeUnpin for Cancellationwhere
*const ArcInner<CancelState> is !null: UnsafeUnpin,
PhantomData<ArcInner<CancelState>>: UnsafeUnpin,
impl UnwindSafe for Cancellationwhere
Arc<CancelState>: UnwindSafe,
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