mist/handler
Types
pub type HandlerError {
InvalidRequest(DecodeError)
NotFound
}
Constructors
-
InvalidRequest(DecodeError)
-
NotFound
pub type HandlerFunc =
fn(Request(Body)) -> HandlerResponse
pub type HandlerResponse {
Response(response: response.Response(HttpResponseBody))
Upgrade(websocket.WebsocketHandler)
}
Constructors
-
Response(response: response.Response(HttpResponseBody))
-
Upgrade(websocket.WebsocketHandler)
Functions
pub fn with(handler: fn(Request(BitString)) ->
Response(BitBuilder), transport: Transport, max_body_limit: Int) -> fn(
HandlerMessage,
LoopState(State),
) -> Next(LoopState(State))
Creates a standard HTTP handler service to pass to mist.serve