Skip to main content

encode_frame

Function encode_frame 

Source
pub fn encode_frame(
    header: &FrameHeader,
    payload: &[u8],
    out: &mut [u8],
    max_frame_size: u32,
) -> Result<usize, Http2Error>
Expand description

Encodes a frame into an output buffer. Spec §4.1.

§Errors

  • FrameTooLarge if payload.len() > max_frame_size.
  • ShortPayload if the output buffer is too small.