pub struct PowerSupplyProperties {
Show 27 fields pub external_power: Option<EnumOrUnknown<ExternalPower>>, pub external_power_source_id: Option<String>, pub available_external_power_source: Vec<PowerSource>, pub battery_state: Option<EnumOrUnknown<BatteryState>>, pub battery_percent: Option<f64>, pub battery_time_to_empty_sec: Option<i64>, pub battery_time_to_full_sec: Option<i64>, pub is_calculating_battery_time: Option<bool>, pub battery_discharge_rate: Option<f64>, pub supports_dual_role_devices: Option<bool>, pub battery_voltage: Option<f64>, pub battery_vendor: Option<String>, pub battery_cycle_count: Option<i64>, pub battery_serial_number: Option<String>, pub battery_charge_full_design: Option<f64>, pub battery_charge_full: Option<f64>, pub battery_voltage_min_design: Option<f64>, pub battery_charge: Option<f64>, pub battery_model_name: Option<String>, pub battery_current: Option<f64>, pub battery_technology: Option<String>, pub battery_status: Option<String>, pub preferred_minimum_external_power: Option<f64>, pub adaptive_charging_supported: Option<bool>, pub adaptive_delaying_charge: Option<bool>, pub adaptive_charging_heuristic_enabled: Option<bool>, pub special_fields: SpecialFields,
}

Fields§

§external_power: Option<EnumOrUnknown<ExternalPower>>§external_power_source_id: Option<String>§available_external_power_source: Vec<PowerSource>§battery_state: Option<EnumOrUnknown<BatteryState>>§battery_percent: Option<f64>§battery_time_to_empty_sec: Option<i64>§battery_time_to_full_sec: Option<i64>§is_calculating_battery_time: Option<bool>§battery_discharge_rate: Option<f64>§supports_dual_role_devices: Option<bool>§battery_voltage: Option<f64>§battery_vendor: Option<String>§battery_cycle_count: Option<i64>§battery_serial_number: Option<String>§battery_charge_full_design: Option<f64>§battery_charge_full: Option<f64>§battery_voltage_min_design: Option<f64>§battery_charge: Option<f64>§battery_model_name: Option<String>§battery_current: Option<f64>§battery_technology: Option<String>§battery_status: Option<String>§preferred_minimum_external_power: Option<f64>§adaptive_charging_supported: Option<bool>§adaptive_delaying_charge: Option<bool>§adaptive_charging_heuristic_enabled: Option<bool>§special_fields: SpecialFields

Implementations§

source§

impl PowerSupplyProperties

source

pub fn new() -> PowerSupplyProperties

source

pub fn external_power(&self) -> ExternalPower

source

pub fn clear_external_power(&mut self)

source

pub fn has_external_power(&self) -> bool

source

pub fn set_external_power(&mut self, v: ExternalPower)

source

pub fn external_power_source_id(&self) -> &str

source

pub fn clear_external_power_source_id(&mut self)

source

pub fn has_external_power_source_id(&self) -> bool

source

pub fn set_external_power_source_id(&mut self, v: String)

source

pub fn mut_external_power_source_id(&mut self) -> &mut String

source

pub fn take_external_power_source_id(&mut self) -> String

source

pub fn battery_state(&self) -> BatteryState

source

pub fn clear_battery_state(&mut self)

source

pub fn has_battery_state(&self) -> bool

source

pub fn set_battery_state(&mut self, v: BatteryState)

source

pub fn battery_percent(&self) -> f64

source

pub fn clear_battery_percent(&mut self)

source

pub fn has_battery_percent(&self) -> bool

source

pub fn set_battery_percent(&mut self, v: f64)

source

pub fn battery_time_to_empty_sec(&self) -> i64

source

pub fn clear_battery_time_to_empty_sec(&mut self)

source

pub fn has_battery_time_to_empty_sec(&self) -> bool

source

pub fn set_battery_time_to_empty_sec(&mut self, v: i64)

source

pub fn battery_time_to_full_sec(&self) -> i64

source

pub fn clear_battery_time_to_full_sec(&mut self)

source

pub fn has_battery_time_to_full_sec(&self) -> bool

source

pub fn set_battery_time_to_full_sec(&mut self, v: i64)

source

pub fn is_calculating_battery_time(&self) -> bool

source

pub fn clear_is_calculating_battery_time(&mut self)

source

pub fn has_is_calculating_battery_time(&self) -> bool

source

pub fn set_is_calculating_battery_time(&mut self, v: bool)

source

pub fn battery_discharge_rate(&self) -> f64

source

pub fn clear_battery_discharge_rate(&mut self)

source

pub fn has_battery_discharge_rate(&self) -> bool

source

pub fn set_battery_discharge_rate(&mut self, v: f64)

source

pub fn supports_dual_role_devices(&self) -> bool

source

pub fn clear_supports_dual_role_devices(&mut self)

source

pub fn has_supports_dual_role_devices(&self) -> bool

source

pub fn set_supports_dual_role_devices(&mut self, v: bool)

source

pub fn battery_voltage(&self) -> f64

source

pub fn clear_battery_voltage(&mut self)

source

pub fn has_battery_voltage(&self) -> bool

source

pub fn set_battery_voltage(&mut self, v: f64)

source

pub fn battery_vendor(&self) -> &str

source

pub fn clear_battery_vendor(&mut self)

source

pub fn has_battery_vendor(&self) -> bool

source

pub fn set_battery_vendor(&mut self, v: String)

source

pub fn mut_battery_vendor(&mut self) -> &mut String

source

pub fn take_battery_vendor(&mut self) -> String

source

pub fn battery_cycle_count(&self) -> i64

source

pub fn clear_battery_cycle_count(&mut self)

source

pub fn has_battery_cycle_count(&self) -> bool

source

pub fn set_battery_cycle_count(&mut self, v: i64)

source

pub fn battery_serial_number(&self) -> &str

source

pub fn clear_battery_serial_number(&mut self)

source

pub fn has_battery_serial_number(&self) -> bool

source

pub fn set_battery_serial_number(&mut self, v: String)

source

pub fn mut_battery_serial_number(&mut self) -> &mut String

source

pub fn take_battery_serial_number(&mut self) -> String

source

pub fn battery_charge_full_design(&self) -> f64

source

pub fn clear_battery_charge_full_design(&mut self)

source

pub fn has_battery_charge_full_design(&self) -> bool

source

pub fn set_battery_charge_full_design(&mut self, v: f64)

source

pub fn battery_charge_full(&self) -> f64

source

pub fn clear_battery_charge_full(&mut self)

source

pub fn has_battery_charge_full(&self) -> bool

source

pub fn set_battery_charge_full(&mut self, v: f64)

source

pub fn battery_voltage_min_design(&self) -> f64

source

pub fn clear_battery_voltage_min_design(&mut self)

source

pub fn has_battery_voltage_min_design(&self) -> bool

source

pub fn set_battery_voltage_min_design(&mut self, v: f64)

source

pub fn battery_charge(&self) -> f64

source

pub fn clear_battery_charge(&mut self)

source

pub fn has_battery_charge(&self) -> bool

source

pub fn set_battery_charge(&mut self, v: f64)

source

pub fn battery_model_name(&self) -> &str

source

pub fn clear_battery_model_name(&mut self)

source

pub fn has_battery_model_name(&self) -> bool

source

pub fn set_battery_model_name(&mut self, v: String)

source

pub fn mut_battery_model_name(&mut self) -> &mut String

source

pub fn take_battery_model_name(&mut self) -> String

source

pub fn battery_current(&self) -> f64

source

pub fn clear_battery_current(&mut self)

source

pub fn has_battery_current(&self) -> bool

source

pub fn set_battery_current(&mut self, v: f64)

source

pub fn battery_technology(&self) -> &str

source

pub fn clear_battery_technology(&mut self)

source

pub fn has_battery_technology(&self) -> bool

source

pub fn set_battery_technology(&mut self, v: String)

source

pub fn mut_battery_technology(&mut self) -> &mut String

source

pub fn take_battery_technology(&mut self) -> String

source

pub fn battery_status(&self) -> &str

source

pub fn clear_battery_status(&mut self)

source

pub fn has_battery_status(&self) -> bool

source

pub fn set_battery_status(&mut self, v: String)

source

pub fn mut_battery_status(&mut self) -> &mut String

source

pub fn take_battery_status(&mut self) -> String

source

pub fn preferred_minimum_external_power(&self) -> f64

source

pub fn clear_preferred_minimum_external_power(&mut self)

source

pub fn has_preferred_minimum_external_power(&self) -> bool

source

pub fn set_preferred_minimum_external_power(&mut self, v: f64)

source

pub fn adaptive_charging_supported(&self) -> bool

source

pub fn clear_adaptive_charging_supported(&mut self)

source

pub fn has_adaptive_charging_supported(&self) -> bool

source

pub fn set_adaptive_charging_supported(&mut self, v: bool)

source

pub fn adaptive_delaying_charge(&self) -> bool

source

pub fn clear_adaptive_delaying_charge(&mut self)

source

pub fn has_adaptive_delaying_charge(&self) -> bool

source

pub fn set_adaptive_delaying_charge(&mut self, v: bool)

source

pub fn adaptive_charging_heuristic_enabled(&self) -> bool

source

pub fn clear_adaptive_charging_heuristic_enabled(&mut self)

source

pub fn has_adaptive_charging_heuristic_enabled(&self) -> bool

source

pub fn set_adaptive_charging_heuristic_enabled(&mut self, v: bool)

Trait Implementations§

source§

impl Clone for PowerSupplyProperties

source§

fn clone(&self) -> PowerSupplyProperties

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PowerSupplyProperties

source§

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

Formats the value using the given formatter. Read more
source§

impl<'a> Default for &'a PowerSupplyProperties

source§

fn default() -> &'a PowerSupplyProperties

Returns the “default value” for a type. Read more
source§

impl Default for PowerSupplyProperties

source§

fn default() -> PowerSupplyProperties

Returns the “default value” for a type. Read more
source§

impl From<PowerSupplyProperties> for PowerData

source§

fn from(props: PowerSupplyProperties) -> Self

Converts to this type from the input type.
source§

impl Message for PowerSupplyProperties

source§

const NAME: &'static str = "PowerSupplyProperties"

Message name as specified in .proto file. Read more
source§

fn is_initialized(&self) -> bool

True iff all required fields are initialized. Always returns true for protobuf 3.
source§

fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> Result<()>

Update this message object with fields read from given stream.
source§

fn compute_size(&self) -> u64

Compute and cache size of this message and all nested messages. Read more
source§

fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_> ) -> Result<()>

Write message to the stream. Read more
source§

fn special_fields(&self) -> &SpecialFields

Special fields (unknown fields and cached size).
source§

fn mut_special_fields(&mut self) -> &mut SpecialFields

Special fields (unknown fields and cached size).
source§

fn new() -> PowerSupplyProperties

Create an empty message object. Read more
source§

fn clear(&mut self)

Reset all fields.
source§

fn default_instance() -> &'static PowerSupplyProperties

Return a pointer to default immutable message with static lifetime. Read more
§

fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, Error>

Parse message from stream.
§

fn cached_size(&self) -> u32

Get size previously computed by compute_size. Read more
§

fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), Error>

Write the message to the stream. Read more
§

fn write_length_delimited_to( &self, os: &mut CodedOutputStream<'_> ) -> Result<(), Error>

Write the message to the stream prepending the message with message length encoded as varint.
§

fn write_length_delimited_to_vec(&self, vec: &mut Vec<u8>) -> Result<(), Error>

Write the message to the vec, prepend the message with message length encoded as varint.
§

fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), Error>

Update this message object with fields read from given stream.
§

fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, Error>

Parse message from reader. Parse stops on EOF or when error encountered.
§

fn parse_from_bytes(bytes: &[u8]) -> Result<Self, Error>

Parse message from byte array.
§

fn check_initialized(&self) -> Result<(), Error>

Check if all required fields of this object are initialized.
§

fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), Error>

Write the message to the writer.
§

fn write_to_vec(&self, v: &mut Vec<u8>) -> Result<(), Error>

Write the message to bytes vec.
§

fn write_to_bytes(&self) -> Result<Vec<u8>, Error>

Write the message to bytes vec. Read more
§

fn write_length_delimited_to_writer( &self, w: &mut dyn Write ) -> Result<(), Error>

Write the message to the writer, prepend the message with message length encoded as varint.
§

fn write_length_delimited_to_bytes(&self) -> Result<Vec<u8>, Error>

Write the message to the bytes vec, prepend the message with message length encoded as varint.
§

fn unknown_fields(&self) -> &UnknownFields

Get a reference to unknown fields.
§

fn mut_unknown_fields(&mut self) -> &mut UnknownFields

Get a mutable reference to unknown fields.
source§

impl PartialEq for PowerSupplyProperties

source§

fn eq(&self, other: &PowerSupplyProperties) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for PowerSupplyProperties

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.