Trait conjure_runtime::raw::Service
source · pub trait Service<R> {
type Response;
type Error;
// Required method
fn call(
&self,
req: R,
) -> impl Future<Output = Result<Self::Response, Self::Error>> + Send;
}Expand description
An asynchronous function from request to response.
This trait is based on the tower::Service trait, but differs in two ways. It does not have a poll_ready method
as our client-side backpressure depends on the request, and the call method takes &self rather than &mut self
as our client is designed to be used through a shared reference.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.