feat(service): rename Service to HttpService, re-export tower::Service`
				
					
				
			The only important trait for a user is the `tower::Service` trait, which is now available also at `hyper::service::Service`. The other "trait aliases" are no longer publicly exported, as people thought they had to implement them. Also removes dependency on `tower-make`, which is trivial but otherwise shouldn't affect anyone. Closes #1959
This commit is contained in:
		| @@ -11,7 +11,7 @@ use crate::common::exec::H2Exec; | ||||
| use crate::common::{Future, Pin, Poll, task}; | ||||
| use crate::headers; | ||||
| use crate::headers::content_length_parse_all; | ||||
| use crate::service::Service; | ||||
| use crate::service::HttpService; | ||||
| use crate::proto::Dispatched; | ||||
| use super::{PipeToSendStream, SendBuf}; | ||||
|  | ||||
| @@ -19,7 +19,7 @@ use crate::{Body, Response}; | ||||
|  | ||||
| pub(crate) struct Server<T, S, B, E> | ||||
| where | ||||
|     S: Service<Body>, | ||||
|     S: HttpService<Body>, | ||||
|     B: Payload, | ||||
| { | ||||
|     exec: E, | ||||
| @@ -28,7 +28,7 @@ where | ||||
| } | ||||
|  | ||||
| // TODO: fix me | ||||
| impl<T, S: Service<Body>, B: Payload, E> Unpin for Server<T, S, B, E> {} | ||||
| impl<T, S: HttpService<Body>, B: Payload, E> Unpin for Server<T, S, B, E> {} | ||||
|  | ||||
| enum State<T, B> | ||||
| where | ||||
| @@ -51,7 +51,7 @@ where | ||||
| impl<T, S, B, E> Server<T, S, B, E> | ||||
| where | ||||
|     T: AsyncRead + AsyncWrite + Unpin, | ||||
|     S: Service<Body, ResBody=B>, | ||||
|     S: HttpService<Body, ResBody=B>, | ||||
|     S::Error: Into<Box<dyn StdError + Send + Sync>>, | ||||
|     B: Payload, | ||||
|     B::Data: Unpin, | ||||
| @@ -89,7 +89,7 @@ where | ||||
| impl<T, S, B, E> Future for Server<T, S, B, E> | ||||
| where | ||||
|     T: AsyncRead + AsyncWrite + Unpin, | ||||
|     S: Service<Body, ResBody=B>, | ||||
|     S: HttpService<Body, ResBody=B>, | ||||
|     S::Error: Into<Box<dyn StdError + Send + Sync>>, | ||||
|     B: Payload, | ||||
|     B::Data: Unpin, | ||||
| @@ -131,7 +131,7 @@ where | ||||
| { | ||||
|     fn poll_server<S, E>(&mut self, cx: &mut task::Context<'_>, service: &mut S, exec: &mut E) -> Poll<crate::Result<()>> | ||||
|     where | ||||
|         S: Service< | ||||
|         S: HttpService< | ||||
|             Body, | ||||
|             ResBody=B, | ||||
|         >, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user