pub struct CommandEncapsulation {
pub source_end_point: u8,
pub bit_address: bool,
pub destination_end_point: u8,
pub command: Vec<u8>,
}Expand description
Multi Channel Command Encapsulation (0x60 0x0d).
Fields§
§source_end_point: u8The source_end_point field (bits 0..7).
bit_address: boolThe bit_address field (bits 7..8).
destination_end_point: u8The destination_end_point field (bits 0..7).
command: Vec<u8>The command field.
Implementations§
Source§impl CommandEncapsulation
impl CommandEncapsulation
Sourcepub fn parse(p: &[u8]) -> Result<Self, ParseError>
pub fn parse(p: &[u8]) -> Result<Self, ParseError>
Parses the payload after the command id. Extra trailing bytes (newer versions) are ignored.
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§
Source§impl Clone for CommandEncapsulation
impl Clone for CommandEncapsulation
Source§impl Debug for CommandEncapsulation
impl Debug for CommandEncapsulation
Source§impl Default for CommandEncapsulation
impl Default for CommandEncapsulation
impl Eq for CommandEncapsulation
Source§impl From<CommandEncapsulation> for Command
impl From<CommandEncapsulation> for Command
Source§fn from(c: CommandEncapsulation) -> Self
fn from(c: CommandEncapsulation) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CommandEncapsulation
impl PartialEq for CommandEncapsulation
impl StructuralPartialEq for CommandEncapsulation
Auto Trait Implementations§
impl Freeze for CommandEncapsulation
impl RefUnwindSafe for CommandEncapsulation
impl Send for CommandEncapsulation
impl Sync for CommandEncapsulation
impl Unpin for CommandEncapsulation
impl UnsafeUnpin for CommandEncapsulation
impl UnwindSafe for CommandEncapsulation
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