Struct mqtt::packet::pubrec::PubrecPacket
source · pub struct PubrecPacket { /* private fields */ }
Expand description
PUBREC
packet
Implementations§
source§impl PubrecPacket
impl PubrecPacket
pub fn new(pkid: u16) -> PubrecPacket
pub fn packet_identifier(&self) -> u16
pub fn set_packet_identifier(&mut self, pkid: u16)
Trait Implementations§
source§impl Clone for PubrecPacket
impl Clone for PubrecPacket
source§fn clone(&self) -> PubrecPacket
fn clone(&self) -> PubrecPacket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PubrecPacket
impl Debug for PubrecPacket
source§impl DecodablePacket for PubrecPacket
impl DecodablePacket for PubrecPacket
type DecodePacketError = Infallible
source§fn decode_packet<R: Read>(
reader: &mut R,
fixed_header: FixedHeader
) -> Result<Self, PacketError<Self>>
fn decode_packet<R: Read>( reader: &mut R, fixed_header: FixedHeader ) -> Result<Self, PacketError<Self>>
Decode packet given a
FixedHeader
source§impl EncodablePacket for PubrecPacket
impl EncodablePacket for PubrecPacket
source§fn fixed_header(&self) -> &FixedHeader
fn fixed_header(&self) -> &FixedHeader
Get a reference to
FixedHeader
. All MQTT packet must have a fixed header.source§fn encode_packet<W: Write>(&self, writer: &mut W) -> Result<()>
fn encode_packet<W: Write>(&self, writer: &mut W) -> Result<()>
Encodes packet data after fixed header, including variable headers and payload
source§fn encoded_packet_length(&self) -> u32
fn encoded_packet_length(&self) -> u32
Length in bytes for data after fixed header, including variable headers and payload
source§impl From<PubrecPacket> for VariablePacket
impl From<PubrecPacket> for VariablePacket
source§fn from(pk: PubrecPacket) -> VariablePacket
fn from(pk: PubrecPacket) -> VariablePacket
Converts to this type from the input type.
source§impl PartialEq for PubrecPacket
impl PartialEq for PubrecPacket
source§fn eq(&self, other: &PubrecPacket) -> bool
fn eq(&self, other: &PubrecPacket) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for PubrecPacket
impl StructuralPartialEq for PubrecPacket
Auto Trait Implementations§
impl Freeze for PubrecPacket
impl RefUnwindSafe for PubrecPacket
impl Send for PubrecPacket
impl Sync for PubrecPacket
impl Unpin for PubrecPacket
impl UnwindSafe for PubrecPacket
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more