pub fn decode_frame(
input: &[u8],
max_frame_size: u32,
) -> Result<(Frame<'_>, usize), Http2Error>Expand description
Decodes a frame from a byte slice. Spec §4.1.
Returns the frame and the number of bytes consumed (header + payload).
§Errors
ShortFrameHeaderif fewer than 9 bytes are available.ShortPayloadif the length is larger than the available buffer.FrameTooLargeif the length exceedsmax_frame_size.UnknownFrameTypeif the type byte is not recognized.