pub fn read_varint(buf: &[u8]) -> Result<(u64, usize), Error>Expand description
Decode a QUIC variable-length integer from the start of buf.
Returns the decoded value and the number of bytes consumed (1, 2, 4, or 8). The encoding is defined in RFC 9000 Section 16.
ยงErrors
Returns Error::InvalidVarint when buf is empty or too short for the
indicated encoding length.