pub struct PubrecPacket { /* private fields */ }
Expand description
PUBREC
packet
Implementations
sourceimpl 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
sourceimpl Clone for PubrecPacket
impl Clone for PubrecPacket
sourcefn clone(&self) -> PubrecPacket
fn clone(&self) -> PubrecPacket
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PubrecPacket
impl Debug for PubrecPacket
sourceimpl DecodablePacket for PubrecPacket
impl DecodablePacket for PubrecPacket
type DecodePacketError = Infallible
sourcefn 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
sourceimpl EncodablePacket for PubrecPacket
impl EncodablePacket for PubrecPacket
sourcefn fixed_header(&self) -> &FixedHeader
fn fixed_header(&self) -> &FixedHeader
Get a reference to FixedHeader
. All MQTT packet must have a fixed header.
sourcefn 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
sourcefn encoded_packet_length(&self) -> u32
fn encoded_packet_length(&self) -> u32
Length in bytes for data after fixed header, including variable headers and payload
sourceimpl From<PubrecPacket> for VariablePacket
impl From<PubrecPacket> for VariablePacket
sourcefn from(pk: PubrecPacket) -> VariablePacket
fn from(pk: PubrecPacket) -> VariablePacket
Performs the conversion.
sourceimpl PartialEq<PubrecPacket> for PubrecPacket
impl PartialEq<PubrecPacket> for PubrecPacket
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &PubrecPacket) -> bool
fn ne(&self, other: &PubrecPacket) -> bool
This method tests for !=
.
impl Eq for PubrecPacket
impl StructuralEq for PubrecPacket
impl StructuralPartialEq for PubrecPacket
Auto Trait Implementations
impl RefUnwindSafe for PubrecPacket
impl Send for PubrecPacket
impl Sync for PubrecPacket
impl Unpin for PubrecPacket
impl UnwindSafe for PubrecPacket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Decodable for T where
T: DecodablePacket,
impl<T> Decodable for T where
T: DecodablePacket,
type Error = PacketError<T>
type Cond = Option<FixedHeader>
sourceimpl<T> Encodable for T where
T: EncodablePacket,
impl<T> Encodable for T where
T: EncodablePacket,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more