CancellationTokenSource
struct · ferroui-system · v0.5.0
struct CancellationTokenSource
Signals to one or more CancellationTokens that they should be canceled.
A source is a CancellationToken that can be canceled (CancellationToken::new): its
token is a clone of it, and canceling either cancels both.
Deprecated since 0.5.0. use
CancellationToken::new(), which can be canceled, and its clones in the place oftoken()
Members
new
fn new() -> Self
token
fn token(self: &Self) -> CancellationToken
The token observing this source.
is_cancellation_requested
fn is_cancellation_requested(self: &Self) -> bool
cancel
fn cancel(self: &Self)
Requests cancellation and runs the registered callbacks on the calling thread. Subsequent calls do nothing.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDefaultFrom<CancellationTokenSource>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.