pub trait AbortControllerExt {
// Required method
fn to_cancellation_token(&self) -> CancellationToken;
}
Required Methods§
Sourcefn to_cancellation_token(&self) -> CancellationToken
fn to_cancellation_token(&self) -> CancellationToken
Converts an AbortController
to a CancellationToken
.
The signal only travels in one direction: AbortController
-> CancellationToken
,
i.e. the CancellationToken
will be cancelled when the AbortController
is aborted
but not the other way around.