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

Check it out middleware module for more details.

Re-exports§

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

Modules§

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

Macros§

bail
Constructs an Error with the given arguments and returns early with an Err result.
error
Constructs an Error with the given arguments.
http_error_bad_gateway
Constructs an Error with hyper::StatusCode::BAD_GATEWAY from a string or existing non-anyhow error value.
http_error_bad_request
Constructs an Error with hyper::StatusCode::BAD_REQUEST from a string or existing non-anyhow error value.
http_error_conflict
Constructs an Error with hyper::StatusCode::CONFLICT from a string or existing non-anyhow error value.
http_error_expectation_failed
Constructs an Error with hyper::StatusCode::EXPECTATION_FAILED from a string or existing non-anyhow error value.
http_error_forbidden
Constructs an Error with hyper::StatusCode::FORBIDDEN from a string or existing non-anyhow error value.
http_error_gateway_timeout
Constructs an Error with hyper::StatusCode::GATEWAY_TIMEOUT from a string or existing non-anyhow error value.
http_error_gone
Constructs an Error with hyper::StatusCode::GONE from a string or existing non-anyhow error value.
http_error_http_version_not_supported
Constructs an Error with hyper::StatusCode::HTTP_VERSION_NOT_SUPPORTED from a string or existing non-anyhow error value.
http_error_insufficient_storage
Constructs an Error with hyper::StatusCode::INSUFFICIENT_STORAGE from a string or existing non-anyhow error value.
http_error_internal_server_error
Constructs an Error with hyper::StatusCode::INTERNAL_SERVER_ERROR from a string or existing non-anyhow error value.
http_error_length_required
Constructs an Error with hyper::StatusCode::LENGTH_REQUIRED from a string or existing non-anyhow error value.
http_error_loop_detected
Constructs an Error with hyper::StatusCode::LOOP_DETECTED from a string or existing non-anyhow error value.
http_error_method_not_allowed
Constructs an Error with hyper::StatusCode::METHOD_NOT_ALLOWED from a string or existing non-anyhow error value.
http_error_not_acceptable
Constructs an Error with hyper::StatusCode::NOT_ACCEPTABLE from a string or existing non-anyhow error value.
http_error_not_found
Constructs an Error with hyper::StatusCode::NOT_FOUND from a string or existing non-anyhow error value.
http_error_not_implemented
Constructs an Error with hyper::StatusCode::NOT_IMPLEMENTED from a string or existing non-anyhow error value.
http_error_payload_too_large
Constructs an Error with hyper::StatusCode::PAYLOAD_TOO_LARGE from a string or existing non-anyhow error value.
http_error_payment_required
Constructs an Error with hyper::StatusCode::PAYMENT_REQUIRED from a string or existing non-anyhow error value.
http_error_precondition_failed
Constructs an Error with hyper::StatusCode::PRECONDITION_FAILED from a string or existing non-anyhow error value.
http_error_proxy_authentication_required
Constructs an Error with hyper::StatusCode::PROXY_AUTHENTICATION_REQUIRED from a string or existing non-anyhow error value.
http_error_range_not_satisfiable
Constructs an Error with hyper::StatusCode::RANGE_NOT_SATISFIABLE from a string or existing non-anyhow error value.
http_error_request_timeout
Constructs an Error with hyper::StatusCode::REQUEST_TIMEOUT from a string or existing non-anyhow error value.
http_error_service_unavailable
Constructs an Error with hyper::StatusCode::SERVICE_UNAVAILABLE from a string or existing non-anyhow error value.
http_error_unauthorized
Constructs an Error with hyper::StatusCode::UNAUTHORIZED from a string or existing non-anyhow error value.
http_error_unsupported_media_type
Constructs an Error with hyper::StatusCode::UNSUPPORTED_MEDIA_TYPE from a string or existing non-anyhow error value.
http_error_uri_too_long
Constructs an Error with hyper::StatusCode::URI_TOO_LONG from a string or existing non-anyhow error value.
http_error_variant_also_negotiates
Constructs an Error with hyper::StatusCode::VARIANT_ALSO_NEGOTIATES from a string or existing non-anyhow error value.

Traits§

Context
Provides the context method for Result.

Attribute Macros§

async_recursion
async_trait