pub struct Connection<B>where
B: HttpBody,{ /* private fields */ }
Expand description
The connection provided from hyper
This provides an interface for DirectService
that will
drive the inner service via poll_service
and can send
requests via call
.
Trait Implementations§
Source§impl<B> Debug for Connection<B>
impl<B> Debug for Connection<B>
Source§impl<B> Service<Request<B>> for Connection<B>
impl<B> Service<Request<B>> for Connection<B>
Source§type Future = ResponseFuture<ResponseFuture>
type Future = ResponseFuture<ResponseFuture>
The future response value.
Auto Trait Implementations§
impl<B> Freeze for Connection<B>
impl<B> !RefUnwindSafe for Connection<B>
impl<B> Send for Connection<B>where
B: Send,
impl<B> Sync for Connection<B>where
B: Send,
impl<B> Unpin for Connection<B>
impl<B> !UnwindSafe for Connection<B>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, B1, B2> HttpService<B1> for T
impl<T, B1, B2> HttpService<B1> for T
Source§type ResponseBody = B2
type ResponseBody = B2
Response payload.
Source§fn poll_ready(&mut self) -> Result<Async<()>, <T as HttpService<B1>>::Error>
fn poll_ready(&mut self) -> Result<Async<()>, <T as HttpService<B1>>::Error>
Returns
Ready
when the service is able to process requests.Source§fn call(&mut self, request: Request<B1>) -> <T as HttpService<B1>>::Future
fn call(&mut self, request: Request<B1>) -> <T as HttpService<B1>>::Future
Process the request and return the response asynchronously.
Source§fn into_service(self) -> IntoService<Self>where
Self: Sized,
fn into_service(self) -> IntoService<Self>where
Self: Sized,
Wrap the HttpService so that it implements tower_service::Service
directly. Read more
Source§fn as_service(&mut self) -> AsService<'_, Self>where
Self: Sized,
fn as_service(&mut self) -> AsService<'_, Self>where
Self: Sized,
Same as
into_service
but operates on an HttpService reference.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more