Skip to main content

serve_until

Function serve_until 

Source
pub async fn serve_until(
    listener: TcpListener,
    routes: Router,
    shutdown: impl Future<Output = ()> + Send + 'static,
) -> Result<()>
Expand description

Serve an already-bound listener with cja middleware and graceful shutdown. This is useful when the application owns its bind address or port.