pub trait ShutdownExt: Future + Sized {
// Provided method
fn with_shutdown(
self,
shutdown: &GracefulShutdown,
) -> Pin<Box<dyn Future<Output = Option<Self::Output>> + Send + '_>>
where Self: Send + 'static,
Self::Output: Send { ... }
}Expand description
Extension trait for futures that adds shutdown awareness
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.