feat(client): expose hyper::client::connect::Connect trait alias

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.
This commit is contained in:
Sean McArthur
2019-12-11 15:50:36 -08:00
parent a07142da2d
commit 2553ea1a7a
3 changed files with 33 additions and 14 deletions

View File

@@ -150,8 +150,6 @@ impl Client<(), Body> {
impl<C, B> Client<C, B>
where
C: Connect + Clone + Send + Sync + 'static,
C::Transport: Unpin + Send + 'static,
C::Future: Unpin + Send + 'static,
B: Payload + Send + 'static,
B::Data: Send,
{
@@ -548,8 +546,6 @@ where
impl<C, B> tower_service::Service<Request<B>> for Client<C, B>
where
C: Connect + Clone + Send + Sync + 'static,
C::Transport: Unpin + Send + 'static,
C::Future: Unpin + Send + 'static,
B: Payload + Send + 'static,
B::Data: Send,
{