pub trait Shutdown {
// Required method
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Define how a protocol should shutdown its connection.
Required Methods§
fn shutdown<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Shutdown for DuplexStream
impl Shutdown for DuplexStream
Source§impl Shutdown for UnixStream
Available on Unix only.
impl Shutdown for UnixStream
Available on Unix only.