Trait GracefulConnection
pub trait GracefulConnection: Future<Output = Result<(), Self::Error>> + Sealed
An internal utility trait as an umbrella target for all (hyper) connection
types that the GracefulShutdown can watch.
Associated Types
type Error;The error type returned by the connection when used as a future.
Required Methods
fn graceful_shutdown(self: Pin<&mut Self>)Start a graceful shutdown process for this connection.
Implementors
impl<I, B, S> GracefulConnection for Connection<I, S> where S: HttpService<Incoming, ResBody = B>, S::Error: Into<Box<dyn Error + Send + Sync>>, I: Read + Write + Unpin + 'static, B: Body + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>,impl<I, B, S, E> GracefulConnection for Connection<'_, I, S, E> where S: Service<Request<Incoming>, Response = Response<B>>, S::Error: Into<Box<dyn Error + Send + Sync>>, S::Future: 'static, I: Read + Write + Unpin + 'static, B: Body + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>, E: Http2ServerConnExec<S::Future, B>,impl<I, B, S, E> GracefulConnection for Connection<I, S, E> where S: HttpService<Incoming, ResBody = B>, S::Error: Into<Box<dyn Error + Send + Sync>>, I: Read + Write + Unpin + 'static, B: Body + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>, E: Http2ServerConnExec<S::Future, B>,impl<I, B, S, E> GracefulConnection for UpgradeableConnection<'_, I, S, E> where S: Service<Request<Incoming>, Response = Response<B>>, S::Error: Into<Box<dyn Error + Send + Sync>>, S::Future: 'static, I: Read + Write + Unpin + Send + 'static, B: Body + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>, E: Http2ServerConnExec<S::Future, B>,