pub trait RouterExt<L> {
// Required method
fn monitored_serve_with_shutdown<ResBody>(
self,
_: SocketAddr,
_: impl Into<String>,
_: TcpConfig,
_: impl Future<Output = ()>,
) -> impl Future<Output = ()>
where L: Layer<Routes>,
L::Service: Service<Request<BoxBody>, Response = Response<ResBody>> + Clone + Send + 'static,
<<L as Layer<Routes>>::Service as Service<Request<BoxBody>>>::Future: Send + 'static,
<<L as Layer<Routes>>::Service as Service<Request<BoxBody>>>::Error: Into<Box<dyn Error + Send + Sync>> + Send,
ResBody: Body<Data = Bytes> + Send + 'static,
ResBody::Error: Into<Box<dyn Error + Send + Sync>>;
}
Required Methods§
sourcefn monitored_serve_with_shutdown<ResBody>(
self,
_: SocketAddr,
_: impl Into<String>,
_: TcpConfig,
_: impl Future<Output = ()>,
) -> impl Future<Output = ()>where
L: Layer<Routes>,
L::Service: Service<Request<BoxBody>, Response = Response<ResBody>> + Clone + Send + 'static,
<<L as Layer<Routes>>::Service as Service<Request<BoxBody>>>::Future: Send + 'static,
<<L as Layer<Routes>>::Service as Service<Request<BoxBody>>>::Error: Into<Box<dyn Error + Send + Sync>> + Send,
ResBody: Body<Data = Bytes> + Send + 'static,
ResBody::Error: Into<Box<dyn Error + Send + Sync>>,
fn monitored_serve_with_shutdown<ResBody>(
self,
_: SocketAddr,
_: impl Into<String>,
_: TcpConfig,
_: impl Future<Output = ()>,
) -> impl Future<Output = ()>where
L: Layer<Routes>,
L::Service: Service<Request<BoxBody>, Response = Response<ResBody>> + Clone + Send + 'static,
<<L as Layer<Routes>>::Service as Service<Request<BoxBody>>>::Future: Send + 'static,
<<L as Layer<Routes>>::Service as Service<Request<BoxBody>>>::Error: Into<Box<dyn Error + Send + Sync>> + Send,
ResBody: Body<Data = Bytes> + Send + 'static,
ResBody::Error: Into<Box<dyn Error + Send + Sync>>,
Serve the given service while monitoring the connection.
Calling the function will first bind the given service to the given address. Awaiting the returned future will then start the server and keep it running until the given signal future resolves.
Object Safety§
This trait is not object safe.