Function kvarn::prelude::parse::headers

source ·
pub fn headers(bytes: &Bytes) -> Result<(HeaderMap<HeaderValue>, 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.