Trait hyper_util::server::graceful::GracefulConnection

source ·
pub trait GracefulConnection: Future<Output = Result<(), Self::Error>> + Sealed {
    type Error;

    // Required method
    fn graceful_shutdown(self: Pin<&mut Self>);
}
Available on crate features server and server-graceful only.
Expand description

An internal utility trait as an umbrella target for all (hyper) connection types that the GracefulShutdown can watch.

Required Associated Types§

source

type Error

The error type returned by the connection when used as a future.

Required Methods§

source

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

Start a graceful shutdown process for this connection.

Implementations on Foreign Types§

source§

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>>,

Available on crate feature http1 only.
§

type Error = Error

source§

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

source§

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>,

Available on crate feature http2 only.
§

type Error = Error

source§

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

Implementors§

source§

impl<'a, I, B, S, E> GracefulConnection for hyper_util::server::conn::auto::Connection<'a, 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>,

Available on crate feature server-auto only.
§

type Error = Box<dyn Error + Sync + Send>

source§

impl<'a, I, B, S, E> GracefulConnection for UpgradeableConnection<'a, 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>,

Available on crate feature server-auto only.
§

type Error = Box<dyn Error + Sync + Send>