pub struct AbortSignal { /* private fields */ }Expand description
A cancellation signal analogous to the Web AbortSignal.
Event-driven: backed by tokio_util::sync::CancellationToken (itself a
tokio::sync::Notify). Consumers can poll is_aborted
synchronously, or await cancelled for prompt,
notification-based wakeup — no polling loop needed.
This type is Send + Sync and cheap to clone.
Implementations§
Source§impl AbortSignal
impl AbortSignal
Trait Implementations§
Source§impl Clone for AbortSignal
impl Clone for AbortSignal
Source§fn clone(&self) -> AbortSignal
fn clone(&self) -> AbortSignal
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 AbortSignal
impl Debug for AbortSignal
Auto Trait Implementations§
impl Freeze for AbortSignal
impl RefUnwindSafe for AbortSignal
impl Send for AbortSignal
impl Sync for AbortSignal
impl Unpin for AbortSignal
impl UnsafeUnpin for AbortSignal
impl UnwindSafe for AbortSignal
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