[][src]Trait mqtt::encodable::Encodable

pub trait Encodable {
    type Err: Error;
    fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Self::Err>;
fn encoded_length(&self) -> u32; }

Methods for encoding an Object to bytes according to MQTT specification

Associated Types

type Err: Error

Loading content...

Required methods

fn encode<W: Write>(&self, writer: &mut W) -> Result<(), Self::Err>

Encodes to writer

fn encoded_length(&self) -> u32

Length of bytes after encoded

Loading content...

Implementations on Foreign Types

impl<'a> Encodable for &'a str[src]

impl<'a> Encodable for &'a [u8][src]

type Err = Error

impl Encodable for String[src]

impl Encodable for Vec<u8>[src]

type Err = Error

impl Encodable for ()[src]

type Err = NoError

Loading content...

Implementors

impl Encodable for ConnectReturnCode[src]

impl Encodable for VariablePacket[src]

impl Encodable for FixedHeader[src]

impl Encodable for ProtocolLevel[src]

impl Encodable for ConnackFlags[src]

impl Encodable for ConnectFlags[src]

impl Encodable for KeepAlive[src]

impl Encodable for PacketIdentifier[src]

impl Encodable for ProtocolName[src]

impl Encodable for TopicNameHeader[src]

impl Encodable for VarBytes[src]

type Err = Error

impl Encodable for ConnectPacketPayload[src]

type Err = ConnectPacketPayloadError

impl Encodable for SubackPacketPayload[src]

type Err = SubackPacketPayloadError

impl Encodable for SubscribePacketPayload[src]

type Err = SubscribePacketPayloadError

impl Encodable for UnsubscribePacketPayload[src]

type Err = UnsubscribePacketPayloadError

impl Encodable for TopicFilter[src]

impl Encodable for TopicName[src]

type Err = TopicNameError

impl<T: Packet + Debug + 'static> Encodable for T[src]

type Err = PacketError<T>

Loading content...