Skip to main content

peek_varint

Function peek_varint 

Source
pub fn peek_varint(buf: &[u8]) -> Option<(u64, usize)>
Expand description

Decodes the varint at the start of buf, returning it and its byte length.

None means the buffer does not yet hold the whole varint, which is a “need more bytes” signal for incremental parsers, not an error.