Skip to main content

serve

Function serve 

Source
pub async fn serve<H, F>(options: &Options, factory: F) -> Result<()>
where H: ServerHandler, F: Fn() -> H + Send + Sync + 'static,
Expand description

Serve the handler over the chosen transport until the client goes away (stdio) or the process is interrupted (HTTP).

ยงErrors

The listener could not bind, or the transport failed underneath the session.