Struct smbioslib::SMBiosPortableBattery[][src]

pub struct SMBiosPortableBattery<'a> { /* fields omitted */ }

Portable Battery (Type 22)

This structure describes the attributes of the portable battery or batteries for the system. The structure contains the static attributes for the group. Each structure describes a single battery pack’s attributes.

Compliant with: DMTF SMBIOS Reference Specification 3.4.0 (DSP0134) Document Date: 2020-07-17

Implementations

impl<'a> SMBiosPortableBattery<'a>[src]

pub fn location(&self) -> Option<String>[src]

Identifies the location of the battery

pub fn manufacturer(&self) -> Option<String>[src]

Names the company that manufactured the battery

pub fn manufacture_date(&self) -> Option<String>[src]

The date on which the battery was manufactured.

Version 2.2+ implementations that use a Smart Battery set this field to 0 (no string) to indicate that the SBDS Manufacture Date field contains the information.

pub fn serial_number(&self) -> Option<String>[src]

The serial number for the battery

Version 2.2+ implementations that use a Smart Battery set this field to 0 (no string) to indicate that the SBDS Serial Number field contains the information.

pub fn device_name(&self) -> Option<String>[src]

Names the battery device

EXAMPLE: “DR-36”

pub fn device_chemistry(&self) -> Option<PortableBatteryDeviceChemistryData>[src]

Identifies the battery chemistry

Version 2.2+ implementations that use a Smart Battery set this field to 02h (Unknown) to indicate that the SBDS Device Chemistry field contains the information.

pub fn design_capacity(&self) -> Option<PortableBatteryDesignCapacity>[src]

Design capacity of the battery in mWatt-hours

If the value is unknown, the field contains 0.

For version 2.2+ implementations, this value is multiplied by the ‘design_capacity_multiplier’ to produce the actual value.

pub fn design_voltage(&self) -> Option<PortableBatteryDesignVoltage>[src]

Design voltage of the battery in mVolts

If the value is unknown, the field contains 0.

pub fn sbds_version_number(&self) -> Option<String>[src]

Contains the Smart Battery Data Specification version number supported by this battery

If the battery does not support the function, no string is supplied.

pub fn maximum_error_in_battery_data(&self) -> Option<u8>[src]

Maximum 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.

pub fn sbds_serial_number(&self) -> Option<u16>[src]

16-bit value that identifies the battery’s serial number

This value, when combined with the Manufacturer, Device Name, and Manufacture Date, uniquely identifies the battery. The Serial Number field must be set to 0 (no string) for this field to be valid.

pub fn sbds_manufacture_date(&self) -> Option<u16>[src]

Date the cell pack was manufactured, in packed format

pub fn sbds_device_chemistry(&self) -> Option<String>[src]

Number of the string that identifies the battery chemistry (for example, “PbAc”) The Device Chemistry field must be set to 02h (Unknown) for this field to be valid.

pub fn design_capacity_multiplier(&self) -> Option<u8>[src]

Multiplication factor of the Design Capacity value, which assures that the mWatt hours value does not overflow for SBDS implementations

The multiplier default is 1, SBDS implementations use the value 10 to correspond to the data as returned from the SBDS Function 18h.

pub fn oem_specific(&self) -> Option<u32>[src]

Contains OEM- or BIOS vendor-specific information

Trait Implementations

impl Debug for SMBiosPortableBattery<'_>[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'a> SMBiosStruct<'a> for SMBiosPortableBattery<'a>[src]

const STRUCT_TYPE: u8[src]

The SMBIOS structure type Read more

fn new(parts: &'a UndefinedStruct) -> Self[src]

Creates a new instance of the implementing SMBIOS type

fn parts(&self) -> &'a UndefinedStruct[src]

Contains the standard parts/sections of the implementing SMBIOS type.

impl Serialize for SMBiosPortableBattery<'_>[src]

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T

Notable traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T

Notable traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.