decode_from

Function decode_from 

Source
pub fn decode_from(buf: &mut BytesMut) -> Result<Option<Frame>, ProtocolError>
Expand description

Try to decode a frame from a buffer, advancing it if successful.

Returns Ok(Some(frame)) if a complete frame was decoded, Ok(None) if more data is needed, or Err on protocol error.

ยงErrors

Returns an error if the frame is too large or invalid.