pub fn decode_from_slice<T: DeserializeOwned>(
bytes: &[u8],
) -> Result<T, CodecError>Expand description
Decodes a T from a complete framed codec buffer.
Validates the frame header, decodes the body positionally, then requires the input to be fully consumed.
ยงErrors
Returns an error if the header is bad or short, the body is malformed, the deserialize request is self-describing, or trailing bytes remain unconsumed.