Trait tonic::client::GrpcService [−][src]
Definition of the gRPC trait alias for tower_service
.
This trait enforces that all tower services provided to Grpc
implements
the correct traits.
Associated Types
type ResponseBody: Body + HttpBody
[src]
Responses body given by the service.
type Error: Into<Box<dyn Error + Send + Sync>>
[src]
Errors produced by the service.
type Future: Future<Output = Result<Response<Self::ResponseBody>, Self::Error>>
[src]
The future response value.
Required methods
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
[src]
Returns Ready
when the service is able to process requests.
Reference Service::poll_ready
.
fn call(&mut self, request: Request<ReqBody>) -> Self::Future
[src]
Process the request and return the response asynchronously.
Reference Service::call
.
Implementors
impl GrpcService<BoxBody> for Channel
[src]
type ResponseBody = Body
type Error = Error
type Future = ResponseFuture
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, request: Request<BoxBody>) -> Self::Future
[src]
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,
<ResBody as HttpBody>::Error: Into<Box<dyn Error + Send + Sync>>,
[src]
T: Service<Request<ReqBody>, Response = Response<ResBody>>,
T::Error: Into<Box<dyn Error + Send + Sync>>,
ResBody: Body + HttpBody,
<ResBody as HttpBody>::Error: Into<Box<dyn Error + Send + Sync>>,