pub trait ProtocolRequest: Encode {
type Response: for<'de> Decode<'de>;
const API_KEY: i16;
const MIN_VERSION: i16;
const MAX_VERSION: i16;
const FLEXIBLE_MIN: i16;
}Expand description
Implemented by every generated Request struct in crabka-protocol.
The crabka-protocol-codegen crate emits this impl for every Request type.
Provides the dispatch information (api key, version range, response type)
that the client needs.
Required Associated Constants§
Sourceconst MIN_VERSION: i16
const MIN_VERSION: i16
Minimum protocol version this Rust type supports.
Sourceconst MAX_VERSION: i16
const MAX_VERSION: i16
Maximum protocol version this Rust type supports.
Sourceconst FLEXIBLE_MIN: i16
const FLEXIBLE_MIN: i16
First version that uses flexible (KIP-482) framing.
i16::MAX for never-flexible messages.
Required Associated Types§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".