Crate hyper_middleware

source ·
Expand description

hyper_middleware

hyper_middleware is a complement set of HTTP middlewares with a small Hyper Service to get started with a HTTP server easily. This module only supports Hyper 0.14.

Features

Re-exports

pub use error::Error;
pub use error::Result;
pub use http::*;
pub use middleware::*;
pub use remote_addr::*;
pub use service::*;

Modules

The custom error module.
Set of HTTP types aliases for convenience.
The middleware and handler system module.
Module representing the remote (peer) address of a connection.
The Hyper service module.

Macros

Constructs an Error with the given arguments and returns early with an Err result.
Constructs an Error with the given arguments.
Constructs an Error with [http::StatusCode::BAD_GATEWAY] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::BAD_REQUEST] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::CONFLICT] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::EXPECTATION_FAILED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::FORBIDDEN] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::GATEWAY_TIMEOUT] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::GONE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::HTTP_VERSION_NOT_SUPPORTED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::INSUFFICIENT_STORAGE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::INTERNAL_SERVER_ERROR] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::LENGTH_REQUIRED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::LOOP_DETECTED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::METHOD_NOT_ALLOWED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::NOT_ACCEPTABLE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::NOT_FOUND] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::NOT_IMPLEMENTED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::PAYLOAD_TOO_LARGE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::PAYMENT_REQUIRED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::PRECONDITION_FAILED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::PROXY_AUTHENTICATION_REQUIRED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::RANGE_NOT_SATISFIABLE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::REQUEST_TIMEOUT] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::SERVICE_UNAVAILABLE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::UNAUTHORIZED] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::UNSUPPORTED_MEDIA_TYPE] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::URI_TOO_LONG] from a string or existing non-anyhow error value.
Constructs an Error with [http::StatusCode::VARIANT_ALSO_NEGOTIATES] from a string or existing non-anyhow error value.

Traits

Provides the context method for Result.