Skip to main content

decode_ref

Function decode_ref 

Source
pub fn decode_ref(data: &[u8]) -> Result<&[u8], CodecError>
Expand description

Return a reference to the raw data without copying (zero-copy decode).

Useful when the caller can work with a borrowed slice.