CancellationGuard
struct · ferroui-system · v0.5.0
struct CancellationGuard
A callback registered with CancellationToken::register or
CancellationToken::register_local, removed when the guard is dropped (the place of
CancellationTokenRegistration).
The shape of Subscription: dispose removes it now,
detach keeps it for the life of the token. A callback that is running when
its guard is dropped finishes (.NET's Dispose waits for it).
Members
dispose
fn dispose(self: Self)
Removes the callback now, the same as dropping the guard.
detach
fn detach(self: Self)
Keeps the callback for the life of the token.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyDropDebugFrom<CancellationTokenRegistration>From<LocalCancellationTokenRegistration>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.