pub struct CxController { /* private fields */ }Expand description
Control handle for a Cx.
Held by the owner of the context to trigger cancellation. Dropping the controller does not cancel the context — cancellation is always explicit.
Implementations§
Source§impl CxController
impl CxController
Sourcepub fn cancel(&self)
pub fn cancel(&self)
Cancel the associated context.
All clones of the Cx (and children) will observe is_cancelled() == true.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether this context has already been cancelled.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CxController
impl RefUnwindSafe for CxController
impl Send for CxController
impl Sync for CxController
impl Unpin for CxController
impl UnsafeUnpin for CxController
impl UnwindSafe for CxController
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