Function httparse::parse_chunk_size

source ·
pub fn parse_chunk_size(
    buf: &[u8]
) -> Result<Status<(usize, u64)>, InvalidChunkSize>
Expand description

Parse a buffer of bytes as a chunk size.

The return value, if complete and successful, includes the index of the buffer that parsing stopped at, and the size of the following chunk.


let buf = b"4\r\nRust\r\n0\r\n\r\n";
           Ok(httparse::Status::Complete((3, 4))));