pub enum Command {
Connect,
Send(OutgoingMessage),
Subscribe(Vec<Topic>),
Unsubscribe(Vec<Topic>),
Disconnect,
}Expand description
Commands from a Handle to the driver.
Variants§
Connect
Open the connection.
Send(OutgoingMessage)
Send a raw message. Subscriptions sent this way are not restored
after a reconnect; use Command::Subscribe for that.
Subscribe(Vec<Topic>)
Subscribe now (if connected) and after every reconnect.
Unsubscribe(Vec<Topic>)
Unsubscribe and stop restoring the topics.
Disconnect
Close the connection.
Trait Implementations§
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