feat(client): change connectors to return an impl Connection
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`.
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
use std::env;
|
||||
use std::io::{self, Write};
|
||||
|
||||
use hyper::Client;
|
||||
use futures_util::StreamExt;
|
||||
use hyper::{Client, body::HttpBody as _};
|
||||
|
||||
// A simple type alias so as to DRY.
|
||||
type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
|
||||
|
||||
Reference in New Issue
Block a user