pub async fn serve_router(listener: TcpListener, router: Router) -> Result<()>Expand description
Serves an already-built router on listener until SIGINT or
SIGTERM, waiting at most SHUTDOWN_GRACE on connections that will
not close by themselves.
router is served through limited_make_service, the wrapping
serve_tls serves through too, so MAX_CONCURRENT_REQUESTS bounds
this listener the same way — see its own doc for why that bound is wired
there rather than as a layer on router itself.