pub async fn read_frame<R>(r: &mut R) -> Result<Option<Vec<u8>>>Expand description
Read a single framed blob.
Returns Ok(None) when the peer closes cleanly at a frame boundary
(zero bytes read before any length-prefix byte). Returns
io::ErrorKind::UnexpectedEof when the stream ends mid-prefix or
mid-body.
ยงErrors
Returns io::ErrorKind::InvalidData when the frame length exceeds
MAX_FRAME_BYTES. Propagates transport read errors from the underlying
async reader.