Module gotham::handler [] [src]

Defines types for Gotham handlers

A function can be used directly as a handler using one of the default implementations of Handler, but the trait can also be implemented directly for greater control.

Structs

HandlerError

Describes an error which occurred during handler execution, and allows the creation of a HTTP Response.

NewHandlerService

Wraps a NewHandler to provide a hyper::server::NewService implementation for Gotham handlers.

Traits

Handler

A Handler receives some subset of requests to the application, and returns a future which resolves to a response. This represents the common entry point for the parts of a Gotham application, implemented by Router and Pipeline.

IntoHandlerError

Allows conversion into a HandlerError from an implementing type.

IntoHandlerFuture

Represents a type which can be converted into the future type returned by a Handler.

IntoResponse

Represents a type which can be converted to a response. This trait is used in converting the return type of a function into a response.

NewHandler

Creates new Handler values.

Type Definitions

HandlerFuture

A type alias for the trait objects returned by HandlerService.