pub trait TypedClient {
// Required methods
fn unary_typed<Req, Res>(
&self,
path: &str,
request: Req,
options: CallOptions,
) -> impl Future<Output = Result<TypedResponse<Res>, Status>>
where Req: Message,
Res: Message + Default;
fn client_streaming_typed<Req, Res, S>(
&self,
path: &str,
requests: S,
options: CallOptions,
) -> impl Future<Output = Result<TypedResponse<Res>, Status>>
where Req: Message + 'static,
Res: Message + Default,
S: Stream<Item = Req> + 'static;
}Expand description
Typed calls over a Client.
Required Methods§
Sourcefn unary_typed<Req, Res>(
&self,
path: &str,
request: Req,
options: CallOptions,
) -> impl Future<Output = Result<TypedResponse<Res>, Status>>
fn unary_typed<Req, Res>( &self, path: &str, request: Req, options: CallOptions, ) -> impl Future<Output = Result<TypedResponse<Res>, Status>>
Unary with prost encode/decode.
Sourcefn client_streaming_typed<Req, Res, S>(
&self,
path: &str,
requests: S,
options: CallOptions,
) -> impl Future<Output = Result<TypedResponse<Res>, Status>>
fn client_streaming_typed<Req, Res, S>( &self, path: &str, requests: S, options: CallOptions, ) -> impl Future<Output = Result<TypedResponse<Res>, Status>>
Client streaming with prost encode/decode.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".