kvarn_utils::parse

Function headers

source
pub fn headers(bytes: &Bytes) -> Result<(HeaderMap, usize), Error>
Expand description

Formats headers and returns the bytes from the start of bytes where the body starts; how many bytes the header occupy.

ยงErrors

Returns an error if parsing a HeaderName or HeaderValue failed.