pub async fn read_frame<R>(
reader: &mut R,
decoder: &mut FrameDecoder,
) -> Result<Frame>where
R: AsyncBufRead + Unpin,Expand description
Read the next frame from reader.
Cancel-safe: bytes are consumed from reader only as decoder takes
them, and a partial line stays in decoder, so a read abandoned in a
select! resumes where it stopped.