This is *just* a "trait alias". It is automatically implemented for all
`Service<Uri>`s that have the required bounds. It's purpose being public
is to ease setting trait bounds outside of hyper. Therefore, it doesn't
have any exposed associated types, to prevent otherwise relying on any
super-traits that hyper requires.
Adds utility functions to `hyper::body` to help asynchronously
collecting all the buffers of some `HttpBody` into one.
- `aggregate` will collect all into an `impl Buf` without copying the
contents. This is ideal if you don't need a contiguous buffer.
- `to_bytes` will copy all the data into a single contiguous `Bytes`
buffer.
Instead of returning a tuple `(impl AsyncRead + AsyncWrite, Connected)`,
this adds a new trait, `hyper::client::connect::Connection`, which
allows querying the connection type for a `Connected`.
BREAKING CHANGE: Connectors no longer return a tuple of
`(T, Connected)`, but a single `T: Connection`.
The `hyper::body::HttpBody` trait is a re-export from the `http-body`
crate. This allows libraries to accept "HTTP bodies" without needing to
depend on hyper.
BREAKING CHANGE: All usage of `hyper::body::Payload` should be replaced
with `hyper::body::HttpBody`.
Allows `local_addr` to work for any executor type, rather than just the default `Exec`. The
underlying `SpawnAll::local_addr()` is already similarly general, so no other changes are needed
other than adding the extra type parameter to the `impl`.
The `hyper::rt::Executor` trait allows defining custom executors to be
used with hyper's `Client` and `Server`.
Closes#1944
BREAKING CHANGE: Any type passed to the `executor` builder methods must
now implement `hyper::rt::Executor`.
`hyper::rt::spawn` usage should be replaced with `tokio::task::spawn`.
`hyper::rt::run` usage should be replaced with `#[tokio::main]` or
managing a `tokio::runtime::Runtime` manually.
It is not possible to connect to an IPv4 address from an IPv6 address or
vice-versa so don't waste time trying. If no remote addresses match then a
"missing connect error" will now occur.
Closes#1903
BREAKING CHANGE: The `Resolve` trait is gone. All custom resolves should
implement `tower::Service` instead.
The error type of `HttpConnector` has been changed away from
`std::io::Error`.
The `Connect` trait is now essentially an alias for
`Service<Destination>`, with a blanket implementation as such, and is
sealed.
Closes#1902
BREAKING CHANGE: Any manual implementations of `Connect` must instead
implement `tower::Service<Destination>`.