pub trait PayloadBinprotReader: RpcMethod {
// Required methods
fn query_payload<R>(r: &mut R) -> Result<Self::Query, RpcQueryReadError>
where R: Read;
fn response_payload<R>(
r: &mut R,
) -> Result<Self::Response, RpcResponseReadError>
where R: Read;
}
Expand description
Trait for reading RPC query and response payloads.
This is a helper trait that makes it easier to decode raw payload data from bin_prot encoded data, following the message header. It simply decodes data wrapped in auxiliary types and returns unwrapped data.
Required Methods§
fn query_payload<R>(r: &mut R) -> Result<Self::Query, RpcQueryReadError>where
R: Read,
fn response_payload<R>(
r: &mut R,
) -> Result<Self::Response, RpcResponseReadError>where
R: Read,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.