Struct mqtt::packet::suback::SubackPacket
source · pub struct SubackPacket { /* private fields */ }
Expand description
SUBACK
packet
Implementations§
source§impl SubackPacket
impl SubackPacket
pub fn new(pkid: u16, subscribes: Vec<SubscribeReturnCode>) -> SubackPacket
pub fn packet_identifier(&self) -> u16
pub fn set_packet_identifier(&mut self, pkid: u16)
pub fn subscribes(&self) -> &[SubscribeReturnCode]
Trait Implementations§
source§impl Clone for SubackPacket
impl Clone for SubackPacket
source§fn clone(&self) -> SubackPacket
fn clone(&self) -> SubackPacket
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 SubackPacket
impl Debug for SubackPacket
source§impl DecodablePacket for SubackPacket
impl DecodablePacket for SubackPacket
type DecodePacketError = SubackPacketError
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 SubackPacket
impl EncodablePacket for SubackPacket
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<SubackPacket> for VariablePacket
impl From<SubackPacket> for VariablePacket
source§fn from(pk: SubackPacket) -> VariablePacket
fn from(pk: SubackPacket) -> VariablePacket
Converts to this type from the input type.
source§impl PartialEq for SubackPacket
impl PartialEq for SubackPacket
source§fn eq(&self, other: &SubackPacket) -> bool
fn eq(&self, other: &SubackPacket) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SubackPacket
impl StructuralPartialEq for SubackPacket
Auto Trait Implementations§
impl Freeze for SubackPacket
impl RefUnwindSafe for SubackPacket
impl Send for SubackPacket
impl Sync for SubackPacket
impl Unpin for SubackPacket
impl UnwindSafe for SubackPacket
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