Skip to main content

decode_var_string8

Function decode_var_string8 

Source
pub fn decode_var_string8(buf: &[u8]) -> Result<(&str, usize), SbeDecodeError>
Expand description

Decodes a varString8 field (u8 length + UTF-8 bytes).

Returns the decoded &str and number of bytes consumed.

ยงErrors

Returns BufferTooShort when the buffer does not contain the full field and InvalidUtf8 when the payload bytes are not valid UTF-8.