Enum mqtt::packet::VariablePacket
source · pub enum VariablePacket {
Show 14 variants
ConnectPacket(ConnectPacket),
ConnackPacket(ConnackPacket),
PublishPacket(PublishPacket),
PubackPacket(PubackPacket),
PubrecPacket(PubrecPacket),
PubrelPacket(PubrelPacket),
PubcompPacket(PubcompPacket),
PingreqPacket(PingreqPacket),
PingrespPacket(PingrespPacket),
SubscribePacket(SubscribePacket),
SubackPacket(SubackPacket),
UnsubscribePacket(UnsubscribePacket),
UnsubackPacket(UnsubackPacket),
DisconnectPacket(DisconnectPacket),
}
Expand description
Variable packet
Variants§
ConnectPacket(ConnectPacket)
ConnackPacket(ConnackPacket)
PublishPacket(PublishPacket)
PubackPacket(PubackPacket)
PubrecPacket(PubrecPacket)
PubrelPacket(PubrelPacket)
PubcompPacket(PubcompPacket)
PingreqPacket(PingreqPacket)
PingrespPacket(PingrespPacket)
SubscribePacket(SubscribePacket)
SubackPacket(SubackPacket)
UnsubscribePacket(UnsubscribePacket)
UnsubackPacket(UnsubackPacket)
DisconnectPacket(DisconnectPacket)
Implementations§
source§impl VariablePacket
impl VariablePacket
pub fn new<T>(t: T) -> VariablePacketwhere
VariablePacket: From<T>,
Trait Implementations§
source§impl Clone for VariablePacket
impl Clone for VariablePacket
source§fn clone(&self) -> VariablePacket
fn clone(&self) -> VariablePacket
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 VariablePacket
impl Debug for VariablePacket
source§impl Decodable for VariablePacket
impl Decodable for VariablePacket
type Error = VariablePacketError
type Cond = Option<FixedHeader>
source§fn decode_with<R: Read>(
reader: &mut R,
fixed_header: Self::Cond
) -> Result<VariablePacket, Self::Error>
fn decode_with<R: Read>( reader: &mut R, fixed_header: Self::Cond ) -> Result<VariablePacket, Self::Error>
Decodes object with additional data (or hints)
source§impl EncodablePacket for VariablePacket
impl EncodablePacket for VariablePacket
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 From<ConnectPacket> for VariablePacket
impl From<ConnectPacket> for VariablePacket
source§fn from(pk: ConnectPacket) -> VariablePacket
fn from(pk: ConnectPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<DisconnectPacket> for VariablePacket
impl From<DisconnectPacket> for VariablePacket
source§fn from(pk: DisconnectPacket) -> VariablePacket
fn from(pk: DisconnectPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PingreqPacket> for VariablePacket
impl From<PingreqPacket> for VariablePacket
source§fn from(pk: PingreqPacket) -> VariablePacket
fn from(pk: PingreqPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PingrespPacket> for VariablePacket
impl From<PingrespPacket> for VariablePacket
source§fn from(pk: PingrespPacket) -> VariablePacket
fn from(pk: PingrespPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PubackPacket> for VariablePacket
impl From<PubackPacket> for VariablePacket
source§fn from(pk: PubackPacket) -> VariablePacket
fn from(pk: PubackPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PubcompPacket> for VariablePacket
impl From<PubcompPacket> for VariablePacket
source§fn from(pk: PubcompPacket) -> VariablePacket
fn from(pk: PubcompPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PublishPacket> for VariablePacket
impl From<PublishPacket> for VariablePacket
source§fn from(pk: PublishPacket) -> VariablePacket
fn from(pk: PublishPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PubrecPacket> for VariablePacket
impl From<PubrecPacket> for VariablePacket
source§fn from(pk: PubrecPacket) -> VariablePacket
fn from(pk: PubrecPacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<PubrelPacket> for VariablePacket
impl From<PubrelPacket> for VariablePacket
source§fn from(pk: PubrelPacket) -> VariablePacket
fn from(pk: PubrelPacket) -> VariablePacket
Converts to this type from the input type.
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 From<SubscribePacket> for VariablePacket
impl From<SubscribePacket> for VariablePacket
source§fn from(pk: SubscribePacket) -> VariablePacket
fn from(pk: SubscribePacket) -> VariablePacket
Converts to this type from the input type.
source§impl From<UnsubackPacket> for VariablePacket
impl From<UnsubackPacket> for VariablePacket
source§fn from(pk: UnsubackPacket) -> VariablePacket
fn from(pk: UnsubackPacket) -> VariablePacket
Converts to this type from the input type.
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 VariablePacket
impl PartialEq for VariablePacket
source§fn eq(&self, other: &VariablePacket) -> bool
fn eq(&self, other: &VariablePacket) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for VariablePacket
impl StructuralPartialEq for VariablePacket
Auto Trait Implementations§
impl Freeze for VariablePacket
impl RefUnwindSafe for VariablePacket
impl Send for VariablePacket
impl Sync for VariablePacket
impl Unpin for VariablePacket
impl UnwindSafe for VariablePacket
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