Skip to main content

decode_bytes_value

Function decode_bytes_value 

Source
pub fn decode_bytes_value(buf: &[u8]) -> Result<(&[u8], usize), TypeError>
Expand description

Read a length-prefixed byte payload from the body.

Call this after decode_field_header returns FieldWireType::Bytes or FieldWireType::Nested. Returns (byte_slice, bytes_consumed), where bytes_consumed includes the length prefix varint.