pub enum Command {
DefaultReset(DefaultReset),
Set(Set),
Get(Get),
Report(Report),
NameGet(NameGet),
NameReport(NameReport),
InfoGet(InfoGet),
InfoReport(InfoReport),
PropertiesGet(PropertiesGet),
PropertiesReport(PropertiesReport),
}Expand description
Every Configuration command.
Variants§
DefaultReset(DefaultReset)
Default Reset.
Set(Set)
Set.
Get(Get)
Get.
Report(Report)
Report.
NameGet(NameGet)
Name Get.
NameReport(NameReport)
Name Report.
InfoGet(InfoGet)
Info Get.
InfoReport(InfoReport)
Info Report.
PropertiesGet(PropertiesGet)
Properties Get.
PropertiesReport(PropertiesReport)
Properties Report.
Implementations§
Source§impl Command
impl Command
Sourcepub fn parse(command: u8, payload: &[u8]) -> Result<Option<Self>, ParseError>
pub fn parse(command: u8, payload: &[u8]) -> Result<Option<Self>, ParseError>
Parses a command of this class; Ok(None) for an unknown command id.
Sourcepub fn command_id(&self) -> u8
pub fn command_id(&self) -> u8
The command id.
Sourcepub fn encode_payload(&self, w: &mut Vec<u8>)
pub fn encode_payload(&self, w: &mut Vec<u8>)
Appends the payload after the command id.
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