pub trait CompatibleControlRequest: Request<ControlProtocol, Error = ControlClientError> {
// Required methods
fn min_generation(&self) -> u8;
fn compatibility_json_bytes(
&self,
) -> ControlClientResult<Zeroizing<Vec<u8>>>;
fn decode_compatibility_json(
&self,
reply: JsonReply,
) -> ControlClientResult<Self::Response>;
}Expand description
A checked request that can select framed CBOR or the historical JSON representation.
Existing CheckedControlRequest implementations receive this behavior through a blanket
implementation. Generation-two requests implement it directly without expanding the released
generation-one ControlRequest enum.
Required Methods§
Sourcefn min_generation(&self) -> u8
fn min_generation(&self) -> u8
First framed-control generation that defines this operation.
Sourcefn compatibility_json_bytes(&self) -> ControlClientResult<Zeroizing<Vec<u8>>>
fn compatibility_json_bytes(&self) -> ControlClientResult<Zeroizing<Vec<u8>>>
Encode the exact historical JSON request without a trailing newline.
Sourcefn decode_compatibility_json(
&self,
reply: JsonReply,
) -> ControlClientResult<Self::Response>
fn decode_compatibility_json( &self, reply: JsonReply, ) -> ControlClientResult<Self::Response>
Decode the actual historical JSON response.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".