Module humphrey::app [−][src]
Structs
Represents the Humphrey app.
Traits
Represents a function able to handle a request with respect to the route it was called from. It is passed the request, the app’s state, and the route it was called from, and must return a response.
Represents a function able to handle a request. It is passed the request as well as the app’s state, and must return a response.
Represents a function able to handle a request.
It is passed only the request, and must return a response.
If you want access to the app’s state, consider using the RequestHandler
trait instead.
Represents a function able to handle a WebSocket handshake and consequent data frames.
Type Definitions
Represents a function able to calculate whether a connection will be accepted.
Represents a function able to handle a connection. In most cases, the default connection handler should be used.
Represents a function able to handle an error.
The first parameter of type Option<Request>
will be Some
if the request could be parsed.
Otherwise, it will be None
and the status code will be StatusCode::BadRequest
.
Represents a generic error with the program.