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
impl PowerSupplyProperties
pub fn new() -> PowerSupplyProperties
pub fn external_power(&self) -> ExternalPower
pub fn clear_external_power(&mut self)
pub fn has_external_power(&self) -> bool
pub fn set_external_power(&mut self, v: ExternalPower)
pub fn external_power_source_id(&self) -> &str
pub fn clear_external_power_source_id(&mut self)
pub fn has_external_power_source_id(&self) -> bool
pub fn set_external_power_source_id(&mut self, v: String)
pub fn mut_external_power_source_id(&mut self) -> &mut String
pub fn take_external_power_source_id(&mut self) -> String
pub fn battery_state(&self) -> BatteryState
pub fn clear_battery_state(&mut self)
pub fn has_battery_state(&self) -> bool
pub fn set_battery_state(&mut self, v: BatteryState)
pub fn battery_percent(&self) -> f64
pub fn clear_battery_percent(&mut self)
pub fn has_battery_percent(&self) -> bool
pub fn set_battery_percent(&mut self, v: f64)
pub fn battery_time_to_empty_sec(&self) -> i64
pub fn clear_battery_time_to_empty_sec(&mut self)
pub fn has_battery_time_to_empty_sec(&self) -> bool
pub fn set_battery_time_to_empty_sec(&mut self, v: i64)
pub fn battery_time_to_full_sec(&self) -> i64
pub fn clear_battery_time_to_full_sec(&mut self)
pub fn has_battery_time_to_full_sec(&self) -> bool
pub fn set_battery_time_to_full_sec(&mut self, v: i64)
pub fn is_calculating_battery_time(&self) -> bool
pub fn clear_is_calculating_battery_time(&mut self)
pub fn has_is_calculating_battery_time(&self) -> bool
pub fn set_is_calculating_battery_time(&mut self, v: bool)
pub fn battery_discharge_rate(&self) -> f64
pub fn clear_battery_discharge_rate(&mut self)
pub fn has_battery_discharge_rate(&self) -> bool
pub fn set_battery_discharge_rate(&mut self, v: f64)
pub fn supports_dual_role_devices(&self) -> bool
pub fn clear_supports_dual_role_devices(&mut self)
pub fn has_supports_dual_role_devices(&self) -> bool
pub fn set_supports_dual_role_devices(&mut self, v: bool)
pub fn battery_voltage(&self) -> f64
pub fn clear_battery_voltage(&mut self)
pub fn has_battery_voltage(&self) -> bool
pub fn set_battery_voltage(&mut self, v: f64)
pub fn battery_vendor(&self) -> &str
pub fn clear_battery_vendor(&mut self)
pub fn has_battery_vendor(&self) -> bool
pub fn set_battery_vendor(&mut self, v: String)
pub fn mut_battery_vendor(&mut self) -> &mut String
pub fn take_battery_vendor(&mut self) -> String
pub fn battery_cycle_count(&self) -> i64
pub fn clear_battery_cycle_count(&mut self)
pub fn has_battery_cycle_count(&self) -> bool
pub fn set_battery_cycle_count(&mut self, v: i64)
pub fn battery_serial_number(&self) -> &str
pub fn clear_battery_serial_number(&mut self)
pub fn has_battery_serial_number(&self) -> bool
pub fn set_battery_serial_number(&mut self, v: String)
pub fn mut_battery_serial_number(&mut self) -> &mut String
pub fn take_battery_serial_number(&mut self) -> String
pub fn battery_charge_full_design(&self) -> f64
pub fn clear_battery_charge_full_design(&mut self)
pub fn has_battery_charge_full_design(&self) -> bool
pub fn set_battery_charge_full_design(&mut self, v: f64)
pub fn battery_charge_full(&self) -> f64
pub fn clear_battery_charge_full(&mut self)
pub fn has_battery_charge_full(&self) -> bool
pub fn set_battery_charge_full(&mut self, v: f64)
pub fn battery_voltage_min_design(&self) -> f64
pub fn clear_battery_voltage_min_design(&mut self)
pub fn has_battery_voltage_min_design(&self) -> bool
pub fn set_battery_voltage_min_design(&mut self, v: f64)
pub fn battery_charge(&self) -> f64
pub fn clear_battery_charge(&mut self)
pub fn has_battery_charge(&self) -> bool
pub fn set_battery_charge(&mut self, v: f64)
pub fn battery_model_name(&self) -> &str
pub fn clear_battery_model_name(&mut self)
pub fn has_battery_model_name(&self) -> bool
pub fn set_battery_model_name(&mut self, v: String)
pub fn mut_battery_model_name(&mut self) -> &mut String
pub fn take_battery_model_name(&mut self) -> String
pub fn battery_current(&self) -> f64
pub fn clear_battery_current(&mut self)
pub fn has_battery_current(&self) -> bool
pub fn set_battery_current(&mut self, v: f64)
pub fn battery_technology(&self) -> &str
pub fn clear_battery_technology(&mut self)
pub fn has_battery_technology(&self) -> bool
pub fn set_battery_technology(&mut self, v: String)
pub fn mut_battery_technology(&mut self) -> &mut String
pub fn take_battery_technology(&mut self) -> String
pub fn battery_status(&self) -> &str
pub fn clear_battery_status(&mut self)
pub fn has_battery_status(&self) -> bool
pub fn set_battery_status(&mut self, v: String)
pub fn mut_battery_status(&mut self) -> &mut String
pub fn take_battery_status(&mut self) -> String
pub fn preferred_minimum_external_power(&self) -> f64
pub fn clear_preferred_minimum_external_power(&mut self)
pub fn has_preferred_minimum_external_power(&self) -> bool
pub fn set_preferred_minimum_external_power(&mut self, v: f64)
pub fn adaptive_charging_supported(&self) -> bool
pub fn clear_adaptive_charging_supported(&mut self)
pub fn has_adaptive_charging_supported(&self) -> bool
pub fn set_adaptive_charging_supported(&mut self, v: bool)
pub fn adaptive_delaying_charge(&self) -> bool
pub fn clear_adaptive_delaying_charge(&mut self)
pub fn has_adaptive_delaying_charge(&self) -> bool
pub fn set_adaptive_delaying_charge(&mut self, v: bool)
pub fn adaptive_charging_heuristic_enabled(&self) -> bool
pub fn clear_adaptive_charging_heuristic_enabled(&mut self)
pub fn has_adaptive_charging_heuristic_enabled(&self) -> bool
pub fn set_adaptive_charging_heuristic_enabled(&mut self, v: bool)
Trait Implementations§
source§impl Clone for PowerSupplyProperties
impl Clone for PowerSupplyProperties
source§fn clone(&self) -> PowerSupplyProperties
fn clone(&self) -> PowerSupplyProperties
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 PowerSupplyProperties
impl Debug for PowerSupplyProperties
source§impl<'a> Default for &'a PowerSupplyProperties
impl<'a> Default for &'a PowerSupplyProperties
source§fn default() -> &'a PowerSupplyProperties
fn default() -> &'a PowerSupplyProperties
Returns the “default value” for a type. Read more
source§impl Default for PowerSupplyProperties
impl Default for PowerSupplyProperties
source§fn default() -> PowerSupplyProperties
fn default() -> PowerSupplyProperties
Returns the “default value” for a type. Read more
source§impl From<PowerSupplyProperties> for PowerData
impl From<PowerSupplyProperties> for PowerData
source§fn from(props: PowerSupplyProperties) -> Self
fn from(props: PowerSupplyProperties) -> Self
Converts to this type from the input type.
source§impl Message for PowerSupplyProperties
impl Message for PowerSupplyProperties
source§const NAME: &'static str = "PowerSupplyProperties"
const NAME: &'static str = "PowerSupplyProperties"
Message name as specified in
.proto
file. Read moresource§fn is_initialized(&self) -> bool
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<()>
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
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<()>
fn write_to_with_cached_sizes( &self, os: &mut CodedOutputStream<'_> ) -> Result<()>
Write message to the stream. Read more
source§fn special_fields(&self) -> &SpecialFields
fn special_fields(&self) -> &SpecialFields
Special fields (unknown fields and cached size).
source§fn mut_special_fields(&mut self) -> &mut SpecialFields
fn mut_special_fields(&mut self) -> &mut SpecialFields
Special fields (unknown fields and cached size).
source§fn new() -> PowerSupplyProperties
fn new() -> PowerSupplyProperties
Create an empty message object. Read more
source§fn default_instance() -> &'static PowerSupplyProperties
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>
fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, Error>
Parse message from stream.
§fn cached_size(&self) -> u32
fn cached_size(&self) -> u32
Get size previously computed by
compute_size
. Read more§fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), Error>
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>
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>
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>
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>
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>
fn parse_from_bytes(bytes: &[u8]) -> Result<Self, Error>
Parse message from byte array.
§fn check_initialized(&self) -> Result<(), Error>
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>
fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), Error>
Write the message to the writer.
§fn write_length_delimited_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), Error>
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>
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
fn unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
§fn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
source§impl PartialEq for PowerSupplyProperties
impl PartialEq for PowerSupplyProperties
source§fn eq(&self, other: &PowerSupplyProperties) -> bool
fn eq(&self, other: &PowerSupplyProperties) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PowerSupplyProperties
Auto Trait Implementations§
impl RefUnwindSafe for PowerSupplyProperties
impl Send for PowerSupplyProperties
impl Sync for PowerSupplyProperties
impl Unpin for PowerSupplyProperties
impl UnwindSafe for PowerSupplyProperties
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
Mutably borrows from an owned value. Read more