Enum Packet

Source
pub enum Packet<TopicsSeq, TopicsQosSeq, Bytes> {
Show 14 variants Connack(Connack), Connect(Connect<Bytes>), Disconnect(Disconnect), Pingreq(Pingreq), Pingresp(Pingresp), Puback(Puback), Pubcomp(Pubcomp), Publish(Publish<Bytes>), Pubrec(Pubrec), Pubrel(Pubrel), Suback(Suback), Subscribe(Subscribe<TopicsQosSeq, Bytes>), Unsuback(Unsuback), Unsubscribe(Unsubscribe<TopicsSeq, Bytes>),
}
Expand description

A type-erased MQTT packet

Variants§

§

Connack(Connack)

An Connack packet

§

Connect(Connect<Bytes>)

An Connect packet

§

Disconnect(Disconnect)

An Disconnect packet

§

Pingreq(Pingreq)

An Pingreq packet

§

Pingresp(Pingresp)

An Pingresp packet

§

Puback(Puback)

An Puback packet

§

Pubcomp(Pubcomp)

An Pubcomp packet

§

Publish(Publish<Bytes>)

An Publish packet

§

Pubrec(Pubrec)

An Pubrec packet

§

Pubrel(Pubrel)

An Pubrel packet

§

Suback(Suback)

An Suback packet

§

Subscribe(Subscribe<TopicsQosSeq, Bytes>)

An Subscribe packet

§

Unsuback(Unsuback)

An Unsuback packet

§

Unsubscribe(Unsubscribe<TopicsSeq, Bytes>)

An Unsubscribe packet

Trait Implementations§

Source§

impl<TopicsSeq: Clone, TopicsQosSeq: Clone, Bytes: Clone> Clone for Packet<TopicsSeq, TopicsQosSeq, Bytes>

Source§

fn clone(&self) -> Packet<TopicsSeq, TopicsQosSeq, Bytes>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<TopicsSeq: Debug, TopicsQosSeq: Debug, Bytes: Debug> Debug for Packet<TopicsSeq, TopicsQosSeq, Bytes>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<TopicsSeq, TopicsQosSeq, Bytes> IntoIterator for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where TopicsSeq: AnyVec<Bytes>, TopicsQosSeq: AnyVec<(Bytes, u8)>, Bytes: AnyVec<u8>,

Source§

type Item = u8

The type of the elements being iterated over.
Source§

type IntoIter = PacketIter<TopicsSeq, TopicsQosSeq, Bytes>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<TopicsSeq: PartialEq, TopicsQosSeq: PartialEq, Bytes: PartialEq> PartialEq for Packet<TopicsSeq, TopicsQosSeq, Bytes>

Source§

fn eq(&self, other: &Packet<TopicsSeq, TopicsQosSeq, Bytes>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<TopicsSeq, TopicsQosSeq, Bytes> TryFromIterator for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where TopicsSeq: AnyVec<Bytes>, TopicsQosSeq: AnyVec<(Bytes, u8)>, Bytes: AnyVec<u8>,

Source§

fn try_from_iter<T>(iter: T) -> Result<Self, DecoderError>
where T: IntoIterator<Item = u8>,

Tries to build Self from the given byte iterator
Source§

impl<TopicsSeq: Eq, TopicsQosSeq: Eq, Bytes: Eq> Eq for Packet<TopicsSeq, TopicsQosSeq, Bytes>

Source§

impl<TopicsSeq, TopicsQosSeq, Bytes> StructuralPartialEq for Packet<TopicsSeq, TopicsQosSeq, Bytes>

Auto Trait Implementations§

§

impl<TopicsSeq, TopicsQosSeq, Bytes> Freeze for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where Bytes: Freeze, TopicsQosSeq: Freeze, TopicsSeq: Freeze,

§

impl<TopicsSeq, TopicsQosSeq, Bytes> RefUnwindSafe for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where Bytes: RefUnwindSafe, TopicsQosSeq: RefUnwindSafe, TopicsSeq: RefUnwindSafe,

§

impl<TopicsSeq, TopicsQosSeq, Bytes> Send for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where Bytes: Send, TopicsQosSeq: Send, TopicsSeq: Send,

§

impl<TopicsSeq, TopicsQosSeq, Bytes> Sync for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where Bytes: Sync, TopicsQosSeq: Sync, TopicsSeq: Sync,

§

impl<TopicsSeq, TopicsQosSeq, Bytes> Unpin for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where Bytes: Unpin, TopicsQosSeq: Unpin, TopicsSeq: Unpin,

§

impl<TopicsSeq, TopicsQosSeq, Bytes> UnwindSafe for Packet<TopicsSeq, TopicsQosSeq, Bytes>
where Bytes: UnwindSafe, TopicsQosSeq: UnwindSafe, TopicsSeq: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.