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
sourceimpl VariablePacket
impl VariablePacket
pub fn new<T>(t: T) -> VariablePacket where
VariablePacket: From<T>,
Trait Implementations
sourceimpl Clone for VariablePacket
impl Clone for VariablePacket
sourcefn clone(&self) -> VariablePacket
fn clone(&self) -> VariablePacket
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VariablePacket
impl Debug for VariablePacket
sourceimpl Decodable for VariablePacket
impl Decodable for VariablePacket
type Error = VariablePacketError
type Cond = Option<FixedHeader>
sourcefn 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)
sourceimpl EncodablePacket for VariablePacket
impl EncodablePacket for VariablePacket
sourcefn fixed_header(&self) -> &FixedHeader
fn fixed_header(&self) -> &FixedHeader
Get a reference to FixedHeader
. All MQTT packet must have a fixed header.
sourcefn 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
sourcefn encoded_packet_length(&self) -> u32
fn encoded_packet_length(&self) -> u32
Length in bytes for data after fixed header, including variable headers and payload
sourceimpl From<ConnackPacket> for VariablePacket
impl From<ConnackPacket> for VariablePacket
sourcefn from(pk: ConnackPacket) -> VariablePacket
fn from(pk: ConnackPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<ConnectPacket> for VariablePacket
impl From<ConnectPacket> for VariablePacket
sourcefn from(pk: ConnectPacket) -> VariablePacket
fn from(pk: ConnectPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<DisconnectPacket> for VariablePacket
impl From<DisconnectPacket> for VariablePacket
sourcefn from(pk: DisconnectPacket) -> VariablePacket
fn from(pk: DisconnectPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PingreqPacket> for VariablePacket
impl From<PingreqPacket> for VariablePacket
sourcefn from(pk: PingreqPacket) -> VariablePacket
fn from(pk: PingreqPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PingrespPacket> for VariablePacket
impl From<PingrespPacket> for VariablePacket
sourcefn from(pk: PingrespPacket) -> VariablePacket
fn from(pk: PingrespPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PubackPacket> for VariablePacket
impl From<PubackPacket> for VariablePacket
sourcefn from(pk: PubackPacket) -> VariablePacket
fn from(pk: PubackPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PubcompPacket> for VariablePacket
impl From<PubcompPacket> for VariablePacket
sourcefn from(pk: PubcompPacket) -> VariablePacket
fn from(pk: PubcompPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PublishPacket> for VariablePacket
impl From<PublishPacket> for VariablePacket
sourcefn from(pk: PublishPacket) -> VariablePacket
fn from(pk: PublishPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PubrecPacket> for VariablePacket
impl From<PubrecPacket> for VariablePacket
sourcefn from(pk: PubrecPacket) -> VariablePacket
fn from(pk: PubrecPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<PubrelPacket> for VariablePacket
impl From<PubrelPacket> for VariablePacket
sourcefn from(pk: PubrelPacket) -> VariablePacket
fn from(pk: PubrelPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<SubackPacket> for VariablePacket
impl From<SubackPacket> for VariablePacket
sourcefn from(pk: SubackPacket) -> VariablePacket
fn from(pk: SubackPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<SubscribePacket> for VariablePacket
impl From<SubscribePacket> for VariablePacket
sourcefn from(pk: SubscribePacket) -> VariablePacket
fn from(pk: SubscribePacket) -> VariablePacket
Performs the conversion.
sourceimpl From<UnsubackPacket> for VariablePacket
impl From<UnsubackPacket> for VariablePacket
sourcefn from(pk: UnsubackPacket) -> VariablePacket
fn from(pk: UnsubackPacket) -> VariablePacket
Performs the conversion.
sourceimpl From<UnsubscribePacket> for VariablePacket
impl From<UnsubscribePacket> for VariablePacket
sourcefn from(pk: UnsubscribePacket) -> VariablePacket
fn from(pk: UnsubscribePacket) -> VariablePacket
Performs the conversion.
sourceimpl PartialEq<VariablePacket> for VariablePacket
impl PartialEq<VariablePacket> for VariablePacket
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &VariablePacket) -> bool
fn ne(&self, other: &VariablePacket) -> bool
This method tests for !=
.
impl Eq for VariablePacket
impl StructuralEq for VariablePacket
impl StructuralPartialEq for VariablePacket
Auto Trait Implementations
impl RefUnwindSafe for VariablePacket
impl Send for VariablePacket
impl Sync for VariablePacket
impl Unpin for VariablePacket
impl UnwindSafe for VariablePacket
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Encodable for T where
T: EncodablePacket,
impl<T> Encodable for T where
T: EncodablePacket,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more