Trait tsukuyomi::Handler

source ·
pub trait Handler {
    type Output;
    type Error: Into<Error>;
    type Handle: TryFuture<Ok = Self::Output, Error = Self::Error>;

    fn allowed_methods(&self) -> Option<&AllowedMethods>;
    fn handle(&self) -> Self::Handle;
}
Expand description

A trait representing the handler associated with the specified endpoint.

Required Associated Types

Required Methods

Returns a list of HTTP methods that this handler accepts.

If it returns a None, it means that the handler accepts all methods.

Creates a Handle which handles the incoming request.

Implementations on Foreign Types

Implementors