Struct mqtt::packet::connect::ConnectPacket [−][src]
pub struct ConnectPacket { /* fields omitted */ }Expand description
CONNECT packet
Implementations
pub fn with_level<P, C>(
protoname: P,
client_identifier: C,
level: u8
) -> Result<ConnectPacket, VariableHeaderError> where
P: Into<String>,
C: Into<String>,
Read back the “reserved” Connect flag bit 0. For compliant implementations this should always be false.
Trait Implementations
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
Get a reference to FixedHeader. All MQTT packet must have a fixed header.
Encodes packet data after fixed header, including variable headers and payload
Length in bytes for data after fixed header, including variable headers and payload
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for ConnectPacket
impl Send for ConnectPacket
impl Sync for ConnectPacket
impl Unpin for ConnectPacket
impl UnwindSafe for ConnectPacket
Blanket Implementations
Mutably borrows from an owned value. Read more
type Error = PacketError<T>
type Cond = Option<FixedHeader>
Decodes object with additional data (or hints)