Trait hyperdriver::server::conn::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<'b, I, S, Executor, B> Connection for UpgradableConnection<'b, 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<AdaptIncomingService<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 + Send + Unpin + 'static,

source§

impl<S, IO, BIn, BOut> Connection for Connection<TokioIo<IO>, TowerHyperService<AdaptIncomingService<S, BIn, BOut>>, TokioExecutor>
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> + 'static, BOut: Body + Send + 'static, BOut::Data: Send + 'static, BOut::Error: Into<Box<dyn Error + Send + Sync>>, IO: AsyncRead + AsyncWrite + Send + Unpin + 'static,