Skip to main content

take_varint

Function take_varint 

Source
pub fn take_varint(buf: &mut Bytes) -> Option<u64>
Expand description

Reads a QUIC varint from the front of buf, consuming it.

None means the buffer does not hold a whole varint. Which error that is depends on which field was being read, so the caller names it.