Module handler

Module handler 

Source
Expand description

Handle the request and make a response.

// A simple echo server
async fn handler(body: String) -> http_kit::Result<String> {
    Ok(body)
}

Structs§

IntoEndpoint
Adapter that turns a strongly typed Handler into an Endpoint.

Enums§

HandlerError
Error type for handler operations.

Traits§

Handler
An HTTP handler. This trait is a wrapper trait for Fn types. You will rarely use this type directly.

Functions§

into_endpoint
Transform handler to endpoint.