Skip to main content

decode

Function decode 

Source
pub fn decode(buf: &[u8]) -> Result<(Message, usize), DecodeError>
Expand description

Decode one Message off the front of buf. Returns the decoded message and the number of bytes consumed. The caller advances its read cursor by consumed on success, retries with more bytes on Truncated, and drops the connection on every other variant.