pub struct AndroidEnergyEstimationBreakdown {
pub energy_consumer_descriptor: Option<AndroidEnergyConsumerDescriptor>,
pub energy_consumer_id: Option<i32>,
pub energy_uws: Option<i64>,
pub per_uid_breakdown: Vec<EnergyUidBreakdown>,
}
Expand description
Energy data retrieve using the ODPM(On Device Power Monitor) API. This proto represents the aidl class: android.hardware.power.stats.EnergyConsumerResult.
Fields§
§energy_consumer_descriptor: Option<AndroidEnergyConsumerDescriptor>
The first trace packet of each session should include a energy consumer descriptor.
energy_consumer_id: Option<i32>
ID of the AndroidEnergyConsumer associated with this result. Matches the energy_consumer_id in the AndroidEnergyConsumerDescriptor that should be sent at the beginning of a trace.
energy_uws: Option<i64>
Total accumulated energy since boot in microwatt-seconds (uWs)
per_uid_breakdown: Vec<EnergyUidBreakdown>
Optional attributed energy per Android ID / Linux UID for this EnergyConsumer. Sum total of attributed energy must be less than or equal to total accumulated energy.
Implementations§
Source§impl AndroidEnergyEstimationBreakdown
impl AndroidEnergyEstimationBreakdown
Sourcepub fn energy_consumer_id(&self) -> i32
pub fn energy_consumer_id(&self) -> i32
Returns the value of energy_consumer_id
, or the default value if energy_consumer_id
is unset.
Sourcepub fn energy_uws(&self) -> i64
pub fn energy_uws(&self) -> i64
Returns the value of energy_uws
, or the default value if energy_uws
is unset.
Trait Implementations§
Source§impl Clone for AndroidEnergyEstimationBreakdown
impl Clone for AndroidEnergyEstimationBreakdown
Source§fn clone(&self) -> AndroidEnergyEstimationBreakdown
fn clone(&self) -> AndroidEnergyEstimationBreakdown
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Message for AndroidEnergyEstimationBreakdown
impl Message for AndroidEnergyEstimationBreakdown
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
.Source§impl PartialEq for AndroidEnergyEstimationBreakdown
impl PartialEq for AndroidEnergyEstimationBreakdown
Source§fn eq(&self, other: &AndroidEnergyEstimationBreakdown) -> bool
fn eq(&self, other: &AndroidEnergyEstimationBreakdown) -> bool
self
and other
values to be equal, and is used by ==
.