#[non_exhaustive]pub enum Command {
#[non_exhaustive] Subscribe {
filters: Vec<(String, QoS)>,
},
#[non_exhaustive] Unsubscribe {
filters: Vec<String>,
},
#[non_exhaustive] Publish {
topic: String,
payload: Vec<u8>,
qos: QoS,
retain: bool,
},
}Available on crate feature
alloc only.Expand description
Work for the MQTT client.
Each variant is #[non_exhaustive]: match it with .., and build it with
Command::subscribe, Command::unsubscribe or Command::publish
outside this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
#[non_exhaustive]Subscribe
Subscribe to every filter in one SUBSCRIBE packet.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Unsubscribe
Unsubscribe from every filter in one UNSUBSCRIBE packet.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]Publish
Publish one message.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Implementations§
Trait Implementations§
impl Eq for Command
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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