Skip to main content

get_nullable_bytes_borrowed

Function get_nullable_bytes_borrowed 

Source
pub fn get_nullable_bytes_borrowed<'de>(
    buf: &mut &'de [u8],
) -> Result<Option<&'de [u8]>, ProtocolError>
Expand description

Decode nullable, non-flexible BYTES that borrow from the input buffer.

§Errors

Returns the underlying protocol error when input is truncated, contains an invalid length or tag, or cannot be encoded for the selected version.

§Panics

Panics if a value previously validated by the protocol type no longer satisfies its encoded-length or field-range invariant.