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
- Compact Middleware & Handler System inspired by The Iron Framework.
- Simple [Hyper Service][
hyper::service::Service] with Remote Address access. - Convenient
ErrorandResulttypes powered by anyhow.
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
Errorwith the given arguments. - Constructs an
Errorwithhyper::StatusCode::BAD_GATEWAYfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::BAD_REQUESTfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::CONFLICTfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::EXPECTATION_FAILEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::FORBIDDENfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::GATEWAY_TIMEOUTfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::GONEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::HTTP_VERSION_NOT_SUPPORTEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::INSUFFICIENT_STORAGEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::INTERNAL_SERVER_ERRORfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::LENGTH_REQUIREDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::LOOP_DETECTEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::METHOD_NOT_ALLOWEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::NOT_ACCEPTABLEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::NOT_FOUNDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::NOT_IMPLEMENTEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::PAYLOAD_TOO_LARGEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::PAYMENT_REQUIREDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::PRECONDITION_FAILEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::PROXY_AUTHENTICATION_REQUIREDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::RANGE_NOT_SATISFIABLEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::REQUEST_TIMEOUTfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::SERVICE_UNAVAILABLEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::UNAUTHORIZEDfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::UNSUPPORTED_MEDIA_TYPEfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::URI_TOO_LONGfrom a string or existing non-anyhow error value. - Constructs an
Errorwithhyper::StatusCode::VARIANT_ALSO_NEGOTIATESfrom a string or existing non-anyhow error value.
Traits
- Provides the
contextmethod forResult.