Skip to main content

take_varstring

Function take_varstring 

Source
fn take_varstring<'a>(data: &mut &'a [u8]) -> Option<&'a [u8]>
Expand description

Takes one length-prefixed byte string from the front of a batch record.

The returned slice borrows the original batch representation, and data advances past it. Invalid lengths or truncated input return None.