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