Struct mqtt::packet::publish::PublishPacket [−][src]
pub struct PublishPacket { /* fields omitted */ }
PUBLISH
packet
Methods
impl PublishPacket
[src]
impl PublishPacket
pub 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
) -> PublishPacket
pub 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) -> bool
pub 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) -> QoSWithPacketIdentifier
pub 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) -> bool
pub 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) -> &str
Trait Implementations
impl Debug for PublishPacket
[src]
impl Debug for PublishPacket
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for PublishPacket
[src]
impl Eq for PublishPacket
impl PartialEq for PublishPacket
[src]
impl PartialEq for PublishPacket
fn eq(&self, other: &PublishPacket) -> bool
[src]
fn eq(&self, other: &PublishPacket) -> bool
This 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) -> bool
This method tests for !=
.
impl Packet for PublishPacket
[src]
impl Packet for PublishPacket
type Payload = Vec<u8>
fn fixed_header(&self) -> &FixedHeader
[src]
fn fixed_header(&self) -> &FixedHeader
Get a FixedHeader
of this packet
fn payload(self) -> Self::Payload
[src]
fn payload(self) -> Self::Payload
Get the payload
fn payload_ref(&self) -> &Self::Payload
[src]
fn payload_ref(&self) -> &Self::Payload
Get 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) -> u32
Length 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 VariablePacket
fn from(pk: PublishPacket) -> VariablePacket
[src]
fn from(pk: PublishPacket) -> VariablePacket
Performs the conversion.
Auto Trait Implementations
impl Send for PublishPacket
impl Send for PublishPacket
impl Sync for PublishPacket
impl Sync for PublishPacket