pub struct Subscribe {
pub pkid: u16,
pub filters: Vec<SubscribeFilter>,
}
Expand description
Subscription packet
Fields§
§pkid: u16
§filters: Vec<SubscribeFilter>
Implementations§
Source§impl Subscribe
impl Subscribe
pub fn new<S: Into<String>>(path: S, qos: QoS) -> Subscribe
pub fn new_many<T>(topics: T) -> Subscribewhere
T: IntoIterator<Item = SubscribeFilter>,
pub fn add(&mut self, path: String, qos: QoS) -> &mut Self
pub fn size(&self) -> usize
pub fn read(fixed_header: FixedHeader, bytes: Bytes) -> Result<Self, Error>
pub fn write(&self, buffer: &mut BytesMut) -> Result<usize, Error>
Trait Implementations§
impl Eq for Subscribe
impl StructuralPartialEq for Subscribe
Auto Trait Implementations§
impl Freeze for Subscribe
impl RefUnwindSafe for Subscribe
impl Send for Subscribe
impl Sync for Subscribe
impl Unpin for Subscribe
impl UnwindSafe for Subscribe
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