Docs.rs
  • hyper-0.14.17
    • hyper 0.14.17
    • Docs.rs crate page
    • MIT
    • Links
    • Homepage
    • Repository
    • crates.io
    • Source
    • Owners
    • seanmonstar
    • github:hyperium:core
    • Dependencies
      • bytes ^1 normal
      • futures-channel ^0.3 normal
      • futures-core ^0.3 normal
      • futures-util ^0.3 normal
      • h2 ^0.3.9 normal
      • http ^0.2 normal
      • http-body ^0.4 normal
      • httparse ^1.6 normal
      • httpdate ^1.0 normal
      • itoa ^1 normal
      • libc ^0.2 normal
      • pin-project-lite ^0.2.4 normal
      • socket2 ^0.4 normal
      • tokio ^1 normal
      • tower-service ^0.3 normal
      • tracing ^0.1 normal
      • want ^0.3 normal
      • futures-util ^0.3 dev
      • matches ^0.1 dev
      • num_cpus ^1.0 dev
      • pretty_env_logger ^0.4 dev
      • serde ^1.0 dev
      • serde_json ^1.0 dev
      • spmc ^0.3 dev
      • tokio ^1 dev
      • tokio-test ^0.4 dev
      • tokio-util ^0.6 dev
      • tower ^0.4 dev
      • url ^2.2 dev
      • pnet_datalink ^0.27.2 dev
    • Versions
    • 100% of the crate is documented
  • Go to latest version
  • 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
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
logo

Crate hyper

logo

Crate hyper

  • Version 0.14.17
  • All Items
  • Modules
  • Structs
  • Type Definitions

Modules

  • body
  • client
  • ext
  • ffi
  • header
  • rt
  • server
  • service
  • upgrade

Structs

  • Body
  • Error
  • Method
  • Request
  • Response
  • StatusCode
  • Uri
  • Version

Type Definitions

  • Result
logo
Change settings

Crate hyper

source · [−]
Expand description

hyper

hyper is a fast and correct HTTP implementation written in and for Rust.

Features

  • HTTP/1 and HTTP/2
  • Asynchronous design
  • Leading in performance
  • Tested and correct
  • Extensive production use
  • Client and Server APIs

If just starting out, check out the Guides first.

“Low-level”

hyper is a lower-level HTTP library, meant to be a building block for libraries and applications.

If looking for just a convenient HTTP client, consider the reqwest crate.

Optional Features

hyper uses a set of feature flags to reduce the amount of compiled code. It is possible to just enable certain features over others. By default, hyper does not enable any features but allows one to enable a subset for their use case. Below is a list of the available feature flags. You may also notice above each function, struct and trait there is listed one or more feature flags that are required for that item to be used.

If you are new to hyper it is possible to enable the full feature flag which will enable all public APIs. Beware though that this will pull in many extra dependencies that you may not need.

The following optional features are available:

  • http1: Enables HTTP/1 support.
  • http2: Enables HTTP/2 support.
  • client: Enables the HTTP client.
  • server: Enables the HTTP server.
  • runtime: Enables convenient integration with tokio, providing connectors and acceptors for TCP, and a default executor.
  • tcp: Enables convenient implementations over TCP (using tokio).
  • stream: Provides futures::Stream capabilities.

Re-exports

pub use crate::http::HeaderMap;
pub use crate::client::Client;
http1 or http2
pub use crate::server::Server;

Modules

body

Streaming bodies for Requests and Responses

clientclient

HTTP Client

ext

HTTP extensions.

ffi

hyper C API

header

HTTP header types

rt

Runtime components

serverserver

HTTP Server

service

Asynchronous Services

upgrade

HTTP Upgrades

Structs

Body

A stream of Bytes, used when receiving bodies.

Error

Represents errors that can occur handling HTTP streams.

Method

The Request Method (VERB)

Request

Represents an HTTP request.

Response

Represents an HTTP response

StatusCode

An HTTP status code (status-code in RFC 7230 et al.).

Uri

The URI component of a request.

Version

Represents a version of the HTTP spec.

Type Definitions

Result

Result type often returned from methods that can have hyper Errors.

Results for Error

hyper::Error
Represents errors that can occur handling HTTP streams.
hyper::body::HttpBody::Error
The error type this Body might generate.
hyper::server::accept::Accept::Error
The error type that can occur when accepting a connection.
hyper::service::Service::Error
Errors produced by the service.
hyper::header::ToStrError
A possible error when converting a HeaderValue to a string …
hyper::ffi::hyper_error
A more detailed error object returned by some hyper …
hyper::ffi::hyper_code::HYPERE_ERROR
General error, details in the hyper_error *.
hyper::ffi::HYPER_IO_ERROR
Sentinel value to return from a read or write callback …
hyper::StatusCode::is_client_error
Check if status is within 400-499.
hyper::StatusCode::is_server_error
Check if status is within 500-599.
hyper::ffi::hyper_error_code
Get an equivalent hyper_code from this error.
hyper::ffi::hyper_error_free
Frees a hyper_error.
hyper::ffi::HYPER_POLL_ERROR
Return in a poll function indicate an error.
hyper::ffi::hyper_task_return_type::HYPER_TASK_ERROR
The value of this task is hyper_error *.
hyper::client::connect::dns::InvalidNameError
Error indicating a given string was not a valid domain …
hyper::ffi::hyper_error_print
Print the details of this error to a buffer.
hyper::server::conn::AddrIncoming::set_sleep_on_errors
Set whether to sleep on accept errors.
hyper::StatusCode::INTERNAL_SERVER_ERROR
500 Internal Server Error [RFC7231, Section 6.6.1]
hyper::server::Builder::tcp_sleep_on_accept_errors
Set whether to sleep on accept errors.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
hyper::Request::fmt
hyper::Response::fmt
hyper::Method::fmt
hyper::StatusCode::fmt
hyper::Uri::fmt
hyper::Version::fmt
hyper::body::SizeHint::fmt
hyper::body::Bytes::fmt
hyper::header::InvalidHeaderName::fmt
hyper::header::InvalidHeaderValue::fmt
hyper::header::HeaderMap::fmt
hyper::header::Iter::fmt
hyper::header::IterMut::fmt
hyper::header::IntoIter::fmt
hyper::header::Keys::fmt
hyper::header::Values::fmt
hyper::header::ValuesMut::fmt
hyper::header::Drain::fmt
hyper::header::GetAll::fmt
hyper::header::Entry::fmt
hyper::header::VacantEntry::fmt
hyper::header::OccupiedEntry::fmt
hyper::header::ValueIter::fmt
hyper::header::ValueIterMut::fmt
hyper::header::ValueDrain::fmt
hyper::header::HeaderName::fmt
hyper::header::HeaderValue::fmt
hyper::header::ToStrError::fmt
hyper::server::Server::from_tcp
Create a new instance from a std::net::TcpListener …
hyper::client::connect::dns::GaiResolver::poll_ready