pub trait CancellationToken:
Send
+ Sync
+ Debug {
// Required methods
fn is_cancelled(&self) -> bool;
fn wait_cancellation(&self) -> LocalBoxFuture<'static, ()>;
}Required Methods§
fn is_cancelled(&self) -> bool
fn wait_cancellation(&self) -> LocalBoxFuture<'static, ()>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl CancellationToken for CancellationToken
Available on crate feature async_runtime only.
impl CancellationToken for CancellationToken
Available on crate feature
async_runtime only.