pub struct AtomicCancel { /* private fields */ }Expand description
Shared atomic cancellation flag.
Safe to share across threads via Arc or bare references. Setting the
flag does not interrupt a thread blocked in kernel I/O; pair with
CancellableRead for poll-between-reads, and kill_child_if_cancelled
(or closing the HTTP body) for preemptive wake-up.
Implementations§
Source§impl AtomicCancel
impl AtomicCancel
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Current flag value.
Trait Implementations§
Source§impl Debug for AtomicCancel
impl Debug for AtomicCancel
Source§impl Default for AtomicCancel
impl Default for AtomicCancel
Source§fn default() -> AtomicCancel
fn default() -> AtomicCancel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for AtomicCancel
impl RefUnwindSafe for AtomicCancel
impl Send for AtomicCancel
impl Sync for AtomicCancel
impl Unpin for AtomicCancel
impl UnsafeUnpin for AtomicCancel
impl UnwindSafe for AtomicCancel
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