Skip to main content

serve

Function serve 

Source
pub async fn serve(
    addr: SocketAddr,
    health: Health,
    shutdown: CancellationToken,
) -> Result<()>
Expand description

Serve the side-server until shutdown is cancelled, binding addr here.

Callers that gate readiness on their listeners actually binding should bind up front and use serve_on instead.

ยงErrors

Returns an error if the listener cannot bind or axum serving fails.