pub struct IntoService<T> { /* private fields */ }Expand description
Wraps an HttpService instance, implementing tower_service::Service.
See into_service function documentation for more details.
Trait Implementations§
Source§impl<T: Debug> Debug for IntoService<T>
impl<T: Debug> Debug for IntoService<T>
Source§impl<T, ReqBody> Service<Request<ReqBody>> for IntoService<T>where
T: HttpService<ReqBody>,
impl<T, ReqBody> Service<Request<ReqBody>> for IntoService<T>where
T: HttpService<ReqBody>,
Source§type Response = Response<<T as HttpService<ReqBody>>::ResponseBody>
type Response = Response<<T as HttpService<ReqBody>>::ResponseBody>
Responses given by the service.
Source§type Error = <T as HttpService<ReqBody>>::Error
type Error = <T as HttpService<ReqBody>>::Error
Errors produced by the service.
Source§type Future = <T as HttpService<ReqBody>>::Future
type Future = <T as HttpService<ReqBody>>::Future
The future response value.
Auto Trait Implementations§
impl<T> Freeze for IntoService<T>where
T: Freeze,
impl<T> RefUnwindSafe for IntoService<T>where
T: RefUnwindSafe,
impl<T> Send for IntoService<T>where
T: Send,
impl<T> Sync for IntoService<T>where
T: Sync,
impl<T> Unpin for IntoService<T>where
T: Unpin,
impl<T> UnwindSafe for IntoService<T>where
T: UnwindSafe,
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