Struct mqtt::packet::publish::PublishPacket [] [src]

pub struct PublishPacket {
    // some fields omitted
}

Methods

impl PublishPacket
[src]

fn new(topic_name: TopicName, qos: QoSWithPacketIdentifier, payload: Vec<u8>) -> PublishPacket

fn set_dup(&mut self, dup: bool)

fn dup(&self) -> bool

fn set_qos(&mut self, qos: QoSWithPacketIdentifier)

fn qos(&self) -> QoSWithPacketIdentifier

fn set_retain(&mut self, ret: bool)

fn retain(&self) -> bool

fn set_topic_name(&mut self, topic_name: TopicName)

fn topic_name(&self) -> &str

Trait Implementations

impl PartialEq for PublishPacket
[src]

fn eq(&self, __arg_0: &PublishPacket) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &PublishPacket) -> bool

This method tests for !=.

impl Eq for PublishPacket
[src]

impl Debug for PublishPacket
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<'a> Packet<'a> for PublishPacket
[src]

type Payload = Vec<u8>

fn fixed_header(&self) -> &FixedHeader

fn payload(&self) -> &Self::Payload

fn encode_variable_headers<W: Write>(&self, writer: &mut W) -> Result<()PacketError<'a, Self>>

fn encoded_variable_headers_length(&self) -> u32

fn decode_packet<R: Read>(reader: &mut R, fixed_header: FixedHeader) -> Result<Self, PacketError<'a, Self>>