Struct tokio_mqttc::tokio::MqttCodec
[−]
[src]
pub struct MqttCodec;
dummy struct implementing tokio codec traits, namely Encoder and Decoder
Trait Implementations
impl Encoder for MqttCodec
[src]
type Item = MqttPacket
The type of items consumed by the Encoder
type Error = Error
The type of encoding errors. Read more
fn encode(
&mut self,
item: Self::Item,
dst: &mut BytesMut
) -> Result<(), Self::Error>
[src]
&mut self,
item: Self::Item,
dst: &mut BytesMut
) -> Result<(), Self::Error>
Encodes a frame into the buffer provided. Read more
impl Decoder for MqttCodec
[src]
type Item = MqttPacket
The type of decoded frames.
type Error = Error
The type of unrecoverable frame decoding errors. Read more
fn decode(
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
src: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
fn decode_eof(
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
[src]
&mut self,
buf: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
A default method available to be called when there are no more bytes available to be read from the underlying I/O. Read more