10 Commits

Author SHA1 Message Date
Sean McArthur
f9f65b7aa6 feat(rt): replace IO traits with hyper::rt ones (#3230)
This replaces the usage of `tokio::io::{AsyncRead, AsyncWrite}` in hyper's public API with new traits in the `hyper::rt` module.

Closes #3110

BREAKING CHANGE: Any IO transport type provided must not implement `hyper::rt::{Read, Write}` instead of
  `tokio::io` traits. You can grab a helper type from `hyper-util` to wrap Tokio types, or implement the traits yourself,
  if it's a custom type.
2023-07-10 14:11:06 -04:00
Sean McArthur
0766d3f78d feat(server): remove server::conn::{Http, Connection} types (#3013)
The connection types have been split into version-specific types, in the
`server::conn::{http1, http2}` modules.

Closes #3012

BREAKING CHANGE: Either choose a version-specific `Connection` type, or
  look for the auto-version type in `hyper-util`.
2022-10-17 13:23:47 -04:00
Sean McArthur
9e8fc8fca1 feat(body): remove "full" constructors from Body (#2958)
The constructors of `hyper::Body` from a full bytes are removed. Along
with `Body::empty()`.

BREAKING CHANGE: Use the types from `http-body-util`.

Co-authored-by: Xuanwo <github@xuanwo.io>
2022-08-24 13:01:26 -07:00
Sean McArthur
0c8ee93d7f feat(client,server): remove tcp feature and code (#2929)
This removes the `tcp` feature from hyper's `Cargo.toml`, and the code it enabled:

- `HttpConnector`
- `GaiResolver`
- `AddrStream`

And parts of `Client` and `Server` that used those types. Alternatives will be available in the `hyper-util` crate.

Closes #2856 
Co-authored-by: MrGunflame <mrgunflame@protonmail.com>
2022-07-29 10:07:09 -07:00
Sean McArthur
0dc89680cd style(lib): run rustfmt and enforce in CI 2019-12-05 13:55:17 -08:00
lzutao
ae75b3a732 chore(lib): remove async_await feature gate (#1909)
`async_await` is stabilized in rust-lang/rust#63209.
2019-08-21 11:09:14 -07:00
Daiki Mizukami
0d3cbe28fc refactor(rt): remove re-export of tokio::main (#1879)
Closes #1878.

BREAKING CHANGE: Replace all usage of `rt::main` with `tokio::main`.
2019-07-22 10:06:36 -07:00
Weihang Lo
22bd31c68f docs(examples): update state example to async/await 2019-07-15 11:35:33 -07:00
Sean McArthur
5da17df97f chore(lib): individually disable tests and examples that aren't updated 2019-07-12 13:44:03 -07:00
Sean McArthur
ae34a86cc3 docs(examples): add a stateful server example with a request counter 2018-07-06 15:24:01 -07:00