decode_binary

Function decode_binary 

Source
pub fn decode_binary<B: Buf>(buf: &mut B) -> Result<Bytes>
Expand description

Decodes binary data with a 2-byte length prefix (compatibility function)

This function provides compatibility with the old binary module API. Prefer using MqttBinary::try_from_be_bytes() for new code.

ยงErrors

Returns an error if there are insufficient bytes in the buffer