Skip to main content

read_frame_bytes

Function read_frame_bytes 

Source
pub fn read_frame_bytes(r: &mut impl Read) -> Result<Option<Vec<u8>>, Error>
Expand description

The next frame’s bytes; None where the stream ends between frames.

§Errors

The reader’s I/O error; io::ErrorKind::UnexpectedEof when the stream ends inside a length or a frame; io::ErrorKind::InvalidData for a length over MAX_FRAME.