pub struct PortableBattery<'a> {
pub handle: u16,
pub location: &'a str,
pub manufacturer: &'a str,
pub manufacture_date: ManufactureDate<'a>,
pub serial_number: SerialNumber<'a>,
pub device_name: &'a str,
pub device_chemistry: DeviceChemistry<'a>,
pub design_capacity: DesignCapacity,
pub design_voltage: u16,
pub sbds_version_number: &'a str,
pub maximum_error_in_battery_data: u8,
pub oem_specific: Option<u32>,
}Expand description
Main struct for Portable Battery (Type 22)
Fields§
§handle: u16Specifies the structure’s handle
location: &'a strLocation of the battery
manufacturer: &'a strCompany name that manufactured the battery
manufacture_date: ManufactureDate<'a>§serial_number: SerialNumber<'a>§device_name: &'a strString that names the battery device
device_chemistry: DeviceChemistry<'a>§design_capacity: DesignCapacity§design_voltage: u16Design voltage of the battery in mVolts.
If the value is unknown, the field contains 0.
sbds_version_number: &'a strString that contains the Smart Battery Data Specification version number supported by this
battery.
If the battery does not support the function, no string is supplied.
maximum_error_in_battery_data: u8Maximum error (as a percentage in the range 0 to 100) in the Watt-hour data reported by the
battery, indicating an upper bound on how much additional energy the battery might have
above the energy it reports having.
If the value is unknown, the field contains FFh.
oem_specific: Option<u32>Trait Implementations§
Source§impl<'a> Clone for PortableBattery<'a>
impl<'a> Clone for PortableBattery<'a>
Source§fn clone(&self) -> PortableBattery<'a>
fn clone(&self) -> PortableBattery<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for PortableBattery<'a>
impl<'a> Debug for PortableBattery<'a>
Source§impl<'a> Hash for PortableBattery<'a>
impl<'a> Hash for PortableBattery<'a>
Source§impl<'a> PartialEq for PortableBattery<'a>
impl<'a> PartialEq for PortableBattery<'a>
impl<'a> Copy for PortableBattery<'a>
impl<'a> Eq for PortableBattery<'a>
impl<'a> StructuralPartialEq for PortableBattery<'a>
Auto Trait Implementations§
impl<'a> Freeze for PortableBattery<'a>
impl<'a> RefUnwindSafe for PortableBattery<'a>
impl<'a> Send for PortableBattery<'a>
impl<'a> Sync for PortableBattery<'a>
impl<'a> Unpin for PortableBattery<'a>
impl<'a> UnwindSafe for PortableBattery<'a>
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