Struct fidl_fuchsia_hardware_power::BatteryInfo
source · pub struct BatteryInfo {
pub unit: BatteryUnit,
pub design_capacity: u32,
pub last_full_capacity: u32,
pub design_voltage: u32,
pub capacity_warning: u32,
pub capacity_low: u32,
pub capacity_granularity_low_warning: u32,
pub capacity_granularity_warning_full: u32,
pub present_rate: i32,
pub remaining_capacity: u32,
pub present_voltage: u32,
}
Fields§
§unit: BatteryUnit
capacity unit. all voltage fields are in millivolts
design_capacity: u32
nominal capacity of a new battery
last_full_capacity: u32
predicted battery capacity when fully charged
design_voltage: u32
nominal voltage of a new battery
capacity_warning: u32
capacity when the device will generate a warning notification
capacity_low: u32
capacity when the device will generate a low battery notification
capacity_granularity_low_warning: u32
the smallest increment the battery is capable of measuring between the low and warning capacities
capacity_granularity_warning_full: u32
the smallest increment the battery is capable of measuring between the low and warning capacities
present_rate: i32
below fields are in units specified the unit
field.
charging/discharging rate in the capacity unit. positive is charging,
negative is discharging
remaining_capacity: u32
§present_voltage: u32
Trait Implementations§
source§impl Clone for BatteryInfo
impl Clone for BatteryInfo
source§fn clone(&self) -> BatteryInfo
fn clone(&self) -> BatteryInfo
Returns a copy 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 Debug for BatteryInfo
impl Debug for BatteryInfo
source§impl Decode<BatteryInfo> for BatteryInfo
impl Decode<BatteryInfo> for BatteryInfo
source§impl Encode<BatteryInfo> for &BatteryInfo
impl Encode<BatteryInfo> for &BatteryInfo
source§impl<T0: Encode<BatteryUnit>, T1: Encode<u32>, T2: Encode<u32>, T3: Encode<u32>, T4: Encode<u32>, T5: Encode<u32>, T6: Encode<u32>, T7: Encode<u32>, T8: Encode<i32>, T9: Encode<u32>, T10: Encode<u32>> Encode<BatteryInfo> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
impl<T0: Encode<BatteryUnit>, T1: Encode<u32>, T2: Encode<u32>, T3: Encode<u32>, T4: Encode<u32>, T5: Encode<u32>, T6: Encode<u32>, T7: Encode<u32>, T8: Encode<i32>, T9: Encode<u32>, T10: Encode<u32>> Encode<BatteryInfo> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
source§impl Hash for BatteryInfo
impl Hash for BatteryInfo
source§impl Ord for BatteryInfo
impl Ord for BatteryInfo
source§fn cmp(&self, other: &BatteryInfo) -> Ordering
fn cmp(&self, other: &BatteryInfo) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<BatteryInfo> for BatteryInfo
impl PartialEq<BatteryInfo> for BatteryInfo
source§fn eq(&self, other: &BatteryInfo) -> bool
fn eq(&self, other: &BatteryInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<BatteryInfo> for BatteryInfo
impl PartialOrd<BatteryInfo> for BatteryInfo
source§fn partial_cmp(&self, other: &BatteryInfo) -> Option<Ordering>
fn partial_cmp(&self, other: &BatteryInfo) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TypeMarker for BatteryInfo
impl TypeMarker for BatteryInfo
§type Owned = BatteryInfo
type Owned = BatteryInfo
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(context: Context) -> usize
fn inline_align(context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
source§fn inline_size(context: Context) -> usize
fn inline_size(context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for BatteryInfo
impl ValueTypeMarker for BatteryInfo
§type Borrowed<'a> = &'a <BatteryInfo as TypeMarker>::Owned
type Borrowed<'a> = &'a <BatteryInfo as TypeMarker>::Owned
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more