[][src]Type Definition vicuna::handler::Handler

type Handler<E = Error> = Box<dyn Fn(Request, Context) -> Result<Response<Body>, E>>;

A type alias for handler functions.

While a default error type is provided, callers may provide their own alternative. This is particularly important when your application deals with error types that are not supported out of the box, such as Serde JSON errors.

Trait Implementations

impl<E> WrappingHandler<E> for Handler<E>[src]