pub fn decode_framed<T: VersionedCodec>(
min_version: u8,
max_version: u8,
bytes: &[u8],
) -> Result<T, CodecError>Expand description
Decode a [version | body] payload, rejecting a version outside the reader’s
supported range [min_version, max_version] with CodecError::VersionUnsupported
before any body parse. An in-range version is dispatched to
VersionedCodec::decode_version, up-converting older layouts into the
current type.