pub struct HealthReport {
pub maximum_capacity: u8,
pub temperature: Value,
}Expand description
Battery Health Report (0x80 0x05).
Fields§
§maximum_capacity: u8The maximum_capacity field.
temperature: ValueThe temperature field.
Implementations§
Source§impl HealthReport
impl HealthReport
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 HealthReport
impl Clone for HealthReport
Source§impl Debug for HealthReport
impl Debug for HealthReport
Source§impl Default for HealthReport
impl Default for HealthReport
impl Eq for HealthReport
Source§impl From<HealthReport> for Command
impl From<HealthReport> for Command
Source§fn from(c: HealthReport) -> Self
fn from(c: HealthReport) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HealthReport
impl PartialEq for HealthReport
impl StructuralPartialEq for HealthReport
Auto Trait Implementations§
impl Freeze for HealthReport
impl RefUnwindSafe for HealthReport
impl Send for HealthReport
impl Sync for HealthReport
impl Unpin for HealthReport
impl UnsafeUnpin for HealthReport
impl UnwindSafe for HealthReport
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