pub struct Subscribe<Seq, Bytes> { /* private fields */ }
Expand description
An MQTT SUBSCRIBE
packet
Implementations§
Source§impl<Seq, Bytes> Subscribe<Seq, Bytes>
impl<Seq, Bytes> Subscribe<Seq, Bytes>
Sourcepub fn new<S, T>(packet_id: u16, topics: S) -> Result<Self, MemoryError>
pub fn new<S, T>(packet_id: u16, topics: S) -> Result<Self, MemoryError>
Creates a new packet
§QoS Levels
Valid QoS levels are:
0
: At most one delivery1
: At least one delivery2
: Exactly one delivery
Sourcepub fn topics_qos(&self) -> &Seq
pub fn topics_qos(&self) -> &Seq
A list of (topic, qos)
-tuples
Trait Implementations§
Source§impl<Seq, Bytes> IntoIterator for Subscribe<Seq, Bytes>
impl<Seq, Bytes> IntoIterator for Subscribe<Seq, Bytes>
Source§type IntoIter = Chain<Chain<Chain<Chain<Empty<u8>, Once<u8>>, Take<<[u8; 4] as IntoIterator>::IntoIter>>, <[u8; 2] as IntoIterator>::IntoIter>, FlatMap<<Seq as IntoIterator>::IntoIter, Chain<Chain<<[u8; 2] as IntoIterator>::IntoIter, <Bytes as IntoIterator>::IntoIter>, Once<u8>>, fn((Bytes, u8)) -> Chain<Chain<<[u8; 2] as IntoIterator>::IntoIter, <Bytes as IntoIterator>::IntoIter>, Once<u8>>>>
type IntoIter = Chain<Chain<Chain<Chain<Empty<u8>, Once<u8>>, Take<<[u8; 4] as IntoIterator>::IntoIter>>, <[u8; 2] as IntoIterator>::IntoIter>, FlatMap<<Seq as IntoIterator>::IntoIter, Chain<Chain<<[u8; 2] as IntoIterator>::IntoIter, <Bytes as IntoIterator>::IntoIter>, Once<u8>>, fn((Bytes, u8)) -> Chain<Chain<<[u8; 2] as IntoIterator>::IntoIter, <Bytes as IntoIterator>::IntoIter>, Once<u8>>>>
Which kind of iterator are we turning this into?
Source§impl<Seq, Bytes> TryFromIterator for Subscribe<Seq, Bytes>
impl<Seq, Bytes> TryFromIterator for Subscribe<Seq, Bytes>
Source§fn try_from_iter<T>(iter: T) -> Result<Self, DecoderError>where
T: IntoIterator<Item = u8>,
fn try_from_iter<T>(iter: T) -> Result<Self, DecoderError>where
T: IntoIterator<Item = u8>,
Tries to build
Self
from the given byte iteratorimpl<Seq: Eq, Bytes: Eq> Eq for Subscribe<Seq, Bytes>
impl<Seq, Bytes> StructuralPartialEq for Subscribe<Seq, Bytes>
Auto Trait Implementations§
impl<Seq, Bytes> Freeze for Subscribe<Seq, Bytes>where
Seq: Freeze,
impl<Seq, Bytes> RefUnwindSafe for Subscribe<Seq, Bytes>where
Seq: RefUnwindSafe,
Bytes: RefUnwindSafe,
impl<Seq, Bytes> Send for Subscribe<Seq, Bytes>
impl<Seq, Bytes> Sync for Subscribe<Seq, Bytes>
impl<Seq, Bytes> Unpin for Subscribe<Seq, Bytes>
impl<Seq, Bytes> UnwindSafe for Subscribe<Seq, Bytes>where
Seq: UnwindSafe,
Bytes: UnwindSafe,
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