Skip to main content

serve

Function serve 

pub async fn serve(
    listener: TcpListener,
    handler: Handler,
    tls: Option<Tls>,
) -> Result<()>
Expand description

Serves handler over HTTP on listener until the task is cancelled: a self-hosted endpoint. With tls, over HTTPS; a CA in tls requires the server’s client certificate (mutual TLS).