pub struct BatteryCounters {
pub charge_counter_uah: Option<i64>,
pub capacity_percent: Option<f32>,
pub current_ua: Option<i64>,
pub current_avg_ua: Option<i64>,
pub name: Option<String>,
pub energy_counter_uwh: Option<i64>,
pub voltage_uv: Option<i64>,
}Fields§
§charge_counter_uah: Option<i64>Battery capacity in microampere-hours(µAh). Also known as Coulomb counter.
capacity_percent: Option<f32>Remaining battery capacity percentage of total capacity
current_ua: Option<i64>Instantaneous battery current in microamperes(µA). Negative values indicate current being drained from the battery and positive values indicate current feeding the battery from a charge source (USB).
See https://perfetto.dev/docs/data-sources/battery-counters for more info.
current_avg_ua: Option<i64>Instantaneous battery current in microamperes(µA).
name: Option<String>Battery name, emitted only on multiple batteries.
energy_counter_uwh: Option<i64>Battery capacity in microwatt-hours(µWh).
voltage_uv: Option<i64>Battery voltage in microvolts(µV).
Implementations§
Source§impl BatteryCounters
impl BatteryCounters
Sourcepub fn charge_counter_uah(&self) -> i64
pub fn charge_counter_uah(&self) -> i64
Returns the value of charge_counter_uah, or the default value if charge_counter_uah is unset.
Sourcepub fn capacity_percent(&self) -> f32
pub fn capacity_percent(&self) -> f32
Returns the value of capacity_percent, or the default value if capacity_percent is unset.
Sourcepub fn current_ua(&self) -> i64
pub fn current_ua(&self) -> i64
Returns the value of current_ua, or the default value if current_ua is unset.
Sourcepub fn current_avg_ua(&self) -> i64
pub fn current_avg_ua(&self) -> i64
Returns the value of current_avg_ua, or the default value if current_avg_ua is unset.
Sourcepub fn energy_counter_uwh(&self) -> i64
pub fn energy_counter_uwh(&self) -> i64
Returns the value of energy_counter_uwh, or the default value if energy_counter_uwh is unset.
Sourcepub fn voltage_uv(&self) -> i64
pub fn voltage_uv(&self) -> i64
Returns the value of voltage_uv, or the default value if voltage_uv is unset.
Trait Implementations§
Source§impl Clone for BatteryCounters
impl Clone for BatteryCounters
Source§fn clone(&self) -> BatteryCounters
fn clone(&self) -> BatteryCounters
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatteryCounters
impl Debug for BatteryCounters
Source§impl Default for BatteryCounters
impl Default for BatteryCounters
Source§fn default() -> BatteryCounters
fn default() -> BatteryCounters
Source§impl Message for BatteryCounters
impl Message for BatteryCounters
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for BatteryCounters
impl PartialEq for BatteryCounters
impl StructuralPartialEq for BatteryCounters
Auto Trait Implementations§
impl Freeze for BatteryCounters
impl RefUnwindSafe for BatteryCounters
impl Send for BatteryCounters
impl Sync for BatteryCounters
impl Unpin for BatteryCounters
impl UnwindSafe for BatteryCounters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].