pub struct Command {
pub tag: u16,
pub data: Vec<u8>,
}Expand description
Represents a final command, complete with a tag and data, ready to be sent to the router.
To create a Command, use a CommandBuilder.
tagis used to identify the command and correlate with its [response::CommandResponse]s when it is received.datacontains the command itself, which is a sequence of bytes, null-terminated.
§Examples
let cmd = CommandBuilder::new().command("/interface/print").build();Fields§
§tag: u16The tag of the command.
data: Vec<u8>The data of the command.
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 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