Skip to main content

AbortControllerExt

Trait AbortControllerExt 

Source
pub trait AbortControllerExt {
    // Required method
    fn to_cancellation_token(&self) -> CancellationToken;
}

Required Methods§

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§