[−][src]Trait tower_grpc::generic::client::GrpcService
A specialization of tower_service::Service.
Existing tower_service::Service implementations with the correct form will
automatically implement GrpcService
.
Associated Types
type ResponseBody: Body + HttpBody
Response body type
type Future: Future<Item = Response<Self::ResponseBody>, Error = Self::Error>
Response future
type Error: Into<Box<dyn Error + Send + Sync>>
Error type
Required methods
fn poll_ready(&mut self) -> Poll<(), Self::Error>
Poll that this service is ready.
fn call(&mut self, request: Request<ReqBody>) -> Self::Future
Call the service.
Provided methods
fn into_service(self) -> IntoService<Self> where
Self: Sized,
Self: Sized,
Helper when needing to pass this type to bounds needing Service
.
fn as_service(&mut self) -> AsService<Self> where
Self: Sized,
Self: Sized,
Helper when needing to pass this type to bounds needing Service
.
Implementors
impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T where
T: Service<Request<ReqBody>, Response = Response<ResBody>>,
T::Error: Into<Box<dyn Error + Send + Sync>>,
ResBody: Body + HttpBody,
[src]
T: Service<Request<ReqBody>, Response = Response<ResBody>>,
T::Error: Into<Box<dyn Error + Send + Sync>>,
ResBody: Body + HttpBody,