Struct mqtt::packet::publish::PublishPacket [−][src]
pub struct PublishPacket { /* fields omitted */ }PUBLISH packet
Methods
impl PublishPacket[src]
impl PublishPacketpub fn new<P: Into<Vec<u8>>>(
topic_name: TopicName,
qos: QoSWithPacketIdentifier,
payload: P
) -> PublishPacket[src]
pub fn new<P: Into<Vec<u8>>>(
topic_name: TopicName,
qos: QoSWithPacketIdentifier,
payload: P
) -> PublishPacketpub fn set_dup(&mut self, dup: bool)[src]
pub fn set_dup(&mut self, dup: bool)pub fn dup(&self) -> bool[src]
pub fn dup(&self) -> boolpub fn set_qos(&mut self, qos: QoSWithPacketIdentifier)[src]
pub fn set_qos(&mut self, qos: QoSWithPacketIdentifier)pub fn qos(&self) -> QoSWithPacketIdentifier[src]
pub fn qos(&self) -> QoSWithPacketIdentifierpub fn set_retain(&mut self, ret: bool)[src]
pub fn set_retain(&mut self, ret: bool)pub fn retain(&self) -> bool[src]
pub fn retain(&self) -> boolpub fn set_topic_name(&mut self, topic_name: TopicName)[src]
pub fn set_topic_name(&mut self, topic_name: TopicName)pub fn topic_name(&self) -> &str[src]
pub fn topic_name(&self) -> &strTrait Implementations
impl Debug for PublishPacket[src]
impl Debug for PublishPacketfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Eq for PublishPacket[src]
impl Eq for PublishPacketimpl PartialEq for PublishPacket[src]
impl PartialEq for PublishPacketfn eq(&self, other: &PublishPacket) -> bool[src]
fn eq(&self, other: &PublishPacket) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &PublishPacket) -> bool[src]
fn ne(&self, other: &PublishPacket) -> boolThis method tests for !=.
impl Packet for PublishPacket[src]
impl Packet for PublishPackettype Payload = Vec<u8>
fn fixed_header(&self) -> &FixedHeader[src]
fn fixed_header(&self) -> &FixedHeaderGet a FixedHeader of this packet
fn payload(self) -> Self::Payload[src]
fn payload(self) -> Self::PayloadGet the payload
fn payload_ref(&self) -> &Self::Payload[src]
fn payload_ref(&self) -> &Self::PayloadGet a borrow of payload
fn encode_variable_headers<W: Write>(
&self,
writer: &mut W
) -> Result<(), PacketError<Self>>[src]
fn encode_variable_headers<W: Write>(
&self,
writer: &mut W
) -> Result<(), PacketError<Self>>Encode variable headers to writer
fn encoded_variable_headers_length(&self) -> u32[src]
fn encoded_variable_headers_length(&self) -> u32Length of bytes after encoding variable header
fn decode_packet<R: Read>(
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>[src]
fn decode_packet<R: Read>(
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>Deocde packet with a FixedHeader
impl From<PublishPacket> for VariablePacket[src]
impl From<PublishPacket> for VariablePacketfn from(pk: PublishPacket) -> VariablePacket[src]
fn from(pk: PublishPacket) -> VariablePacketPerforms the conversion.
Auto Trait Implementations
impl Send for PublishPacket
impl Send for PublishPacketimpl Sync for PublishPacket
impl Sync for PublishPacket