5d3c472228d40b57e47ea26004b3710cfdd451f3
hyper::Error type
**The `Error` is now an opaque struct**, which allows for more variants to be added freely, and the internal representation to change without being breaking changes. For inspecting an `Error`, there are several `is_*` methods to check for certain classes of errors, such as `Error::is_parse()`. The `cause` can also be inspected, like before. This likely seems like a downgrade, but more inspection can be added as needed! The `Error` now knows about more states, which gives much more context around when a certain error occurs. This is also expressed in the description and `fmt` messages. **Most places where a user would provide an error to hyper can now pass any error type** (`E: Into<Box<std::error::Error>>`). This error is passed back in relevant places, and can be useful for logging. This should make it much clearer about what error a user should provide to hyper: any it feels is relevant! Closes #1128 Closes #1130 Closes #1431 Closes #1338 BREAKING CHANGE: `Error` is no longer an enum to pattern match over, or to construct. Code will need to be updated accordingly. For body streams or `Service`s, inference might be unable to determine what error type you mean to return. Starting in Rust 1.26, you could just label that as `!` if you never return an error.
hyper
A low-level HTTP implementation for Rust.
Get started by looking over the guides.
Overview
hyper is a fast, safe HTTP implementation written in and for Rust.
hyper offers both an HTTP client and server which can be used to drive complex web applications written entirely in Rust.
hyper makes use of "async IO" (non-blocking sockets) via the Tokio and Futures crates.
Be aware that hyper is still actively evolving towards 1.0, and is likely to experience breaking changes before stabilising. You can also see the issues in the upcoming milestones.
Languages
Rust
94.5%
C
5.2%
Shell
0.3%