Docs.rs
  • hyper-middleware-0.0.9
    • hyper-middleware 0.0.9
    • Permalink
    • Docs.rs crate page
    • MIT OR Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • joseluisq
    • Dependencies
      • anyhow ^1.0.79 normal
      • async-recursion ^1.0.5 normal
      • async-trait ^0.1.77 normal
      • hyper ^0.14.28 normal
      • thiserror ^1.0.56 normal
      • hyper ^0.14 dev
      • tokio ^1 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate hyper_middleware

hyper_middleware0.0.9

  • All Items

Sections

  • hyper_middleware
    • Features

Crate Items

  • Re-exports
  • Modules
  • Macros
  • Traits
  • Attribute Macros

Crates

  • hyper_middleware

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 with Remote Address access.
  • Convenient Error and Result types powered by anyhow.
  • Async support via async-trait.
  • Macros to facilitate HTTP response errors or error casting.

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

Results

Settings
Help

Query parser error: "Unexpected - (did you mean ->?)".