pub struct DeviceSpecificReport {
pub device_id_type: u8,
pub data_format: u8,
pub data: Vec<u8>,
}Expand description
Manufacturer Specific Device Specific Report (0x72 0x07).
Fields§
§device_id_type: u8The device_id_type field (bits 0..3).
data_format: u8The data_format field (bits 5..8).
data: Vec<u8>The data field.
Implementations§
Source§impl DeviceSpecificReport
impl DeviceSpecificReport
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 DeviceSpecificReport
impl Clone for DeviceSpecificReport
Source§impl Debug for DeviceSpecificReport
impl Debug for DeviceSpecificReport
Source§impl Default for DeviceSpecificReport
impl Default for DeviceSpecificReport
impl Eq for DeviceSpecificReport
Source§impl From<DeviceSpecificReport> for Command
impl From<DeviceSpecificReport> for Command
Source§fn from(c: DeviceSpecificReport) -> Self
fn from(c: DeviceSpecificReport) -> Self
Converts to this type from the input type.
Source§impl PartialEq for DeviceSpecificReport
impl PartialEq for DeviceSpecificReport
impl StructuralPartialEq for DeviceSpecificReport
Auto Trait Implementations§
impl Freeze for DeviceSpecificReport
impl RefUnwindSafe for DeviceSpecificReport
impl Send for DeviceSpecificReport
impl Sync for DeviceSpecificReport
impl Unpin for DeviceSpecificReport
impl UnsafeUnpin for DeviceSpecificReport
impl UnwindSafe for DeviceSpecificReport
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