Struct mqtt::packet::connack::ConnackPacket
source · pub struct ConnackPacket { /* private fields */ }
Expand description
CONNACK
packet
Implementations§
source§impl ConnackPacket
impl ConnackPacket
pub fn new(session_present: bool, ret_code: ConnectReturnCode) -> ConnackPacket
pub fn connack_flags(&self) -> ConnackFlags
pub fn connect_return_code(&self) -> ConnectReturnCode
Trait Implementations§
source§impl Clone for ConnackPacket
impl Clone for ConnackPacket
source§fn clone(&self) -> ConnackPacket
fn clone(&self) -> ConnackPacket
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 ConnackPacket
impl Debug for ConnackPacket
source§impl DecodablePacket for ConnackPacket
impl DecodablePacket for ConnackPacket
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 ConnackPacket
impl EncodablePacket for ConnackPacket
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<ConnackPacket> for VariablePacket
impl From<ConnackPacket> for VariablePacket
source§fn from(pk: ConnackPacket) -> VariablePacket
fn from(pk: ConnackPacket) -> VariablePacket
Converts to this type from the input type.
source§impl PartialEq for ConnackPacket
impl PartialEq for ConnackPacket
source§fn eq(&self, other: &ConnackPacket) -> bool
fn eq(&self, other: &ConnackPacket) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ConnackPacket
impl StructuralPartialEq for ConnackPacket
Auto Trait Implementations§
impl Freeze for ConnackPacket
impl RefUnwindSafe for ConnackPacket
impl Send for ConnackPacket
impl Sync for ConnackPacket
impl Unpin for ConnackPacket
impl UnwindSafe for ConnackPacket
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