Skip to main content

serve

Function serve 

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

Serves app on listener until shutdown finishes.

ยงErrors

Returns the I/O error that stopped the server.