feat(client): change Connect trait into an alias for Service

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>`.
This commit is contained in:
Sean McArthur
2019-10-21 17:26:21 -07:00
parent 4f2743991c
commit d67e49f149
6 changed files with 256 additions and 113 deletions

View File

@@ -38,10 +38,13 @@ pub use tower_service::Service;
mod http;
mod make;
mod oneshot;
mod util;
pub(crate) use self::make::{MakeConnection, MakeServiceRef};
pub(crate) use self::http::HttpService;
pub(crate) use self::oneshot::{oneshot, Oneshot};
pub use self::make::make_service_fn;
pub use self::util::service_fn;