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