feat(server): introduce Accept trait

The `Accept` trait is used by the server types to asynchronously accept
incoming connections. This replaces the previous usage of `Stream`.

BREAKING CHANGE: Passing a `Stream` to `Server::builder` or
  `Http::serve_incoming` must be changed to pass an `Accept` instead. The
  `stream` optional feature can be enabled, and the a stream can be
  converted using `hyper::server:🉑:from_stream`.
This commit is contained in:
Sean McArthur
2019-09-05 10:54:50 -07:00
parent 0867ad5c15
commit b3e5506261
7 changed files with 189 additions and 71 deletions

View File

@@ -69,6 +69,11 @@ runtime = [
"tokio-net",
"tokio-timer",
]
# unstable features
stream = []
# internal features used in CI
nightly = []
__internal_flaky_tests = []
__internal_happy_eyeballs_tests = []