pub struct AsService<'a, T>(/* private fields */);Expand description
Helper when needing to pass a GrpcService to bounds needing Service.
Trait Implementations§
Source§impl<'a, T, ReqBody> Service<Request<ReqBody>> for AsService<'a, T>where
T: GrpcService<ReqBody> + 'a,
impl<'a, T, ReqBody> Service<Request<ReqBody>> for AsService<'a, T>where
T: GrpcService<ReqBody> + 'a,
Source§type Response = Response<<T as GrpcService<ReqBody>>::ResponseBody>
type Response = Response<<T as GrpcService<ReqBody>>::ResponseBody>
Responses given by the service.
Source§type Future = <T as GrpcService<ReqBody>>::Future
type Future = <T as GrpcService<ReqBody>>::Future
The future response value.
Source§type Error = <T as GrpcService<ReqBody>>::Error
type Error = <T as GrpcService<ReqBody>>::Error
Errors produced by the service.
Auto Trait Implementations§
impl<'a, T> Freeze for AsService<'a, T>
impl<'a, T> RefUnwindSafe for AsService<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for AsService<'a, T>where
T: Send,
impl<'a, T> Sync for AsService<'a, T>where
T: Sync,
impl<'a, T> Unpin for AsService<'a, T>
impl<'a, T> !UnwindSafe for AsService<'a, T>
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, ReqBody, ResBody> GrpcService<ReqBody> for T
impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
Source§type ResponseBody = ResBody
type ResponseBody = ResBody
Response body type
Source§fn poll_ready(
&mut self,
) -> Result<Async<()>, <T as GrpcService<ReqBody>>::Error>
fn poll_ready( &mut self, ) -> Result<Async<()>, <T as GrpcService<ReqBody>>::Error>
Poll that this service is ready.
Source§fn call(
&mut self,
request: Request<ReqBody>,
) -> <T as GrpcService<ReqBody>>::Future
fn call( &mut self, request: Request<ReqBody>, ) -> <T as GrpcService<ReqBody>>::Future
Call the service.
Source§fn into_service(self) -> IntoService<Self>where
Self: Sized,
fn into_service(self) -> IntoService<Self>where
Self: Sized,
Helper when needing to pass this type to bounds needing
Service.Source§fn as_service(&mut self) -> AsService<'_, Self>where
Self: Sized,
fn as_service(&mut self) -> AsService<'_, Self>where
Self: Sized,
Helper when needing to pass this type to bounds needing
Service.