diff --git a/src/command.rs b/src/command.rs index d9aad04..18c973b 100644 --- a/src/command.rs +++ b/src/command.rs @@ -3,7 +3,7 @@ pub mod instruction; pub type Data = heapless_bytes::Bytes; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Command { class: class::Class, instruction: instruction::Instruction, @@ -37,6 +37,10 @@ impl Command { &self.data } + pub fn data_mut(&mut self) -> &mut Data { + &mut self.data + } + pub fn expected(&self) -> usize { self.le }