pub async fn serve(
listener: impl Accept,
tls: Arc<ServerConfig>,
app: Router,
shutdown: impl Future<Output = ()>,
) -> Result<()>Expand description
Serves app on listener over TLS until shutdown completes, within
the default ConnectionLimits. A connection whose handshake fails,
such as plain HTTP, is dropped; the server goes on.