EncodePacket

Trait EncodePacket 

Source
pub trait EncodePacket {
    // Required method
    fn encode(
        &self,
        buf: &mut [u8],
        version: MqttVersion,
    ) -> Result<usize, MqttError<ErrorPlaceHolder>>;
}
Expand description

A trait for packets that can be encoded into a byte buffer.

Required Methods§

Source

fn encode( &self, buf: &mut [u8], version: MqttVersion, ) -> Result<usize, MqttError<ErrorPlaceHolder>>

Implementors§