pub trait AbortSignalExt {
// Required method
fn to_cancellation_token(&self) -> CancellationToken;
}Required Methods§
Sourcefn to_cancellation_token(&self) -> CancellationToken
fn to_cancellation_token(&self) -> CancellationToken
Converts an AbortSignal to a CancellationToken.
The signal only travels in one direction: AbortSignal -> CancellationToken,
i.e. the CancellationToken will be cancelled when the AbortSignal is aborted
but not the other way around.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".