pub struct SupportedReport {
pub meter_reset: bool,
pub rate_type: u8,
pub meter_type: u8,
pub more_scale_types: bool,
pub scales: u8,
pub extra_scales: Vec<u8>,
}Expand description
Meter Supported Report (0x32 0x04).
Fields§
§meter_reset: boolThe meter_reset field (bits 7..8).
rate_type: u8The rate_type field (bits 5..7).
meter_type: u8The meter_type field (bits 0..5).
more_scale_types: boolThe more_scale_types field (bits 7..8).
scales: u8The scales field (bits 0..7).
extra_scales: Vec<u8>The extra_scales field.
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