pub struct Command {
pub id: u16,
pub reply: bool,
pub bytecode: Vec<u8>,
/* private fields */
}Expand description
The packets that get sent to EV3. Can contain more than 1 OpCode
§Example
let mut cmd = Command::new();
let mut byte = vec![];
// Add bytecode to byte
cmd.bytecode = byte;
println!("SENT: {:02X?}", cmd.gen_bytes());Fields§
§id: u16Command ID
reply: boolReply to direct command
bytecode: Vec<u8>Bytes containing OpCodes and Parameter
Implementations§
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