Function decode_bytes

Source
pub fn decode_bytes(
    buf: &Bytes,
) -> Result<Option<(BytesFrame, usize)>, RedisProtocolError>
Available on crate features resp3 and bytes only.
Expand description

Attempt to decode the provided buffer without moving or copying the inner buffer contents.

The returned frame(s) will hold owned views into the original buffer via slice.

Unlike decode_bytes_mut, this function will not modify the input buffer.