pub struct AndroidPowerConfig {
pub battery_poll_ms: Option<u32>,
pub battery_counters: Vec<i32>,
pub collect_power_rails: Option<bool>,
pub collect_energy_estimation_breakdown: Option<bool>,
pub collect_entity_state_residency: Option<bool>,
}
Fields§
§battery_poll_ms: Option<u32>
§battery_counters: Vec<i32>
§collect_power_rails: Option<bool>
Where available enables per-power-rail measurements.
collect_energy_estimation_breakdown: Option<bool>
Provides a breakdown of energy estimation for various subsystem (e.g. GPU). Available from Android S.
collect_entity_state_residency: Option<bool>
Provides a breakdown of time in state for various subsystems. Available from Android U.
Implementations§
Source§impl AndroidPowerConfig
impl AndroidPowerConfig
Sourcepub fn battery_poll_ms(&self) -> u32
pub fn battery_poll_ms(&self) -> u32
Returns the value of battery_poll_ms
, or the default value if battery_poll_ms
is unset.
Sourcepub fn battery_counters(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<BatteryCounters>>
pub fn battery_counters( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<BatteryCounters>>
Returns an iterator which yields the valid enum values contained in battery_counters
.
Sourcepub fn push_battery_counters(&mut self, value: BatteryCounters)
pub fn push_battery_counters(&mut self, value: BatteryCounters)
Appends the provided enum value to battery_counters
.
Sourcepub fn collect_power_rails(&self) -> bool
pub fn collect_power_rails(&self) -> bool
Returns the value of collect_power_rails
, or the default value if collect_power_rails
is unset.
Sourcepub fn collect_energy_estimation_breakdown(&self) -> bool
pub fn collect_energy_estimation_breakdown(&self) -> bool
Returns the value of collect_energy_estimation_breakdown
, or the default value if collect_energy_estimation_breakdown
is unset.
Sourcepub fn collect_entity_state_residency(&self) -> bool
pub fn collect_entity_state_residency(&self) -> bool
Returns the value of collect_entity_state_residency
, or the default value if collect_entity_state_residency
is unset.
Trait Implementations§
Source§impl Clone for AndroidPowerConfig
impl Clone for AndroidPowerConfig
Source§fn clone(&self) -> AndroidPowerConfig
fn clone(&self) -> AndroidPowerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AndroidPowerConfig
impl Debug for AndroidPowerConfig
Source§impl Default for AndroidPowerConfig
impl Default for AndroidPowerConfig
Source§impl Message for AndroidPowerConfig
impl Message for AndroidPowerConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.