pub struct SupportedReport {
pub primary_switch_type: u8,
pub secondary_switch_type: u8,
}Expand description
Multilevel Switch Supported Report (0x26 0x07).
Fields§
§primary_switch_type: u8The primary_switch_type field (bits 0..5).
secondary_switch_type: u8The secondary_switch_type field (bits 0..5).
Implementations§
Source§impl SupportedReport
impl SupportedReport
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 SupportedReport
impl Clone for SupportedReport
Source§impl Debug for SupportedReport
impl Debug for SupportedReport
Source§impl Default for SupportedReport
impl Default for SupportedReport
impl Eq for SupportedReport
Source§impl From<SupportedReport> for Command
impl From<SupportedReport> for Command
Source§fn from(c: SupportedReport) -> Self
fn from(c: SupportedReport) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SupportedReport
impl PartialEq for SupportedReport
impl StructuralPartialEq for SupportedReport
Auto Trait Implementations§
impl Freeze for SupportedReport
impl RefUnwindSafe for SupportedReport
impl Send for SupportedReport
impl Sync for SupportedReport
impl Unpin for SupportedReport
impl UnsafeUnpin for SupportedReport
impl UnwindSafe for SupportedReport
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