Trait tonic::client::GrpcService [−][src]
pub trait GrpcService<ReqBody> { type ResponseBody: Body + HttpBody; type Error: Into<Box<dyn Error + Send + Sync>>; type Future: Future<Output = Result<Response<Self::ResponseBody>, Self::Error>>; fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), Self::Error>>; fn call(&mut self, request: Request<ReqBody>) -> Self::Future; }
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
Loading content...