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

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

Required Methods

Encodes to writer

Length of bytes after encoded

Implementations on Foreign Types

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

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

impl Encodable for String
[src]

impl Encodable for Vec<u8>
[src]

impl Encodable for ()
[src]

Implementors