pub trait RpcRequest: Sized {
type Response;
const METHOD: Method;
// Required methods
fn into_rpc_input(self) -> Input;
fn response_from_rpc_result(
result: Result,
) -> Result<Self::Response, RealtimeError>;
}Expand description
Typed Inline realtime RPC request.
This trait is implemented for generated protocol input types so callers can
use RealtimeClient::call without manually pairing each input with its
proto::Method and result oneof.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn into_rpc_input(self) -> Input
fn into_rpc_input(self) -> Input
Converts this request into the generated RPC input oneof.
Sourcefn response_from_rpc_result(
result: Result,
) -> Result<Self::Response, RealtimeError>
fn response_from_rpc_result( result: Result, ) -> Result<Self::Response, RealtimeError>
Extracts the typed response from the generated RPC result oneof.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".