pub async fn serve_with_graceful_shutdown<S, B, I>(
io: I,
service: S,
stopped: impl Future<Output = ()>,
) -> Result<(), BoxError>
Expand description
Serve a service over a TCP connection with graceful shutdown. This means that pending requests will be completed before the server is stopped.