Trait Connection

Source
pub trait Connection {
    // Required method
    fn graceful_shutdown(self: Pin<&mut Self>);
}
Available on crate feature server only.
Expand description

A connection that can be gracefully shutdown.

Required Methods§

Source

fn graceful_shutdown(self: Pin<&mut Self>)

Gracefully shutdown the connection.

Implementors§

Source§

impl<I, S, Executor, B> Connection for UpgradableConnection<'_, I, S, Executor>
where S: HttpService<Incoming, ResBody = B> + Clone, S::Future: 'static, S::Error: Into<Box<dyn Error + Send + Sync>>, B: Body + 'static, B::Error: Into<Box<dyn Error + Send + Sync>>, I: Read + Write + Unpin + Send + 'static, Executor: Http2ServerConnExec<S::Future, B>,

Source§

impl<S, IO, BIn, BOut> Connection for UpgradeableConnection<TokioIo<IO>, TowerHyperService<IncomingRequestService<S, BIn, BOut>>>
where S: Service<Request<BIn>, Response = Response<BOut>> + Clone + Send + 'static, S::Future: Send + 'static, S::Error: Into<Box<dyn Error + Send + Sync>>, BIn: From<Incoming>, BOut: Body + Send + 'static, BOut::Error: Into<Box<dyn Error + Send + Sync>>, IO: AsyncRead + AsyncWrite + Unpin + 'static,

Source§

impl<S, IO, BIn, BOut, E> Connection for Connection<TokioIo<IO>, TowerHyperService<IncomingRequestService<S, BIn, BOut>>, E>
where S: Service<Request<BIn>, Response = Response<BOut>> + Clone + 'static, S::Future: 'static, S::Error: Into<Box<dyn Error + Send + Sync>>, BIn: From<Incoming> + 'static, BOut: Body + Send + 'static, BOut::Data: Send + 'static, BOut::Error: Into<Box<dyn Error + Send + Sync>>, IO: AsyncRead + AsyncWrite + Unpin + 'static, E: Http2ServerConnExec<TowerHyperFuture<IncomingRequestService<S, BIn, BOut>, Request<Incoming>>, BOut> + Clone + Send + 'static,