pub struct HostBatteryUpdate {
pub battery_present: bool,
pub charging: bool,
pub discharging: bool,
pub rate: u32,
pub remaining_capacity: u32,
pub max_capacity: u32,
pub ac_online: bool,
}Expand description
Updated battery state from the host
Fields§
§battery_present: boolIs the battery present?
charging: boolIs the battery charging?
discharging: boolIs the battery discharging?
rate: u32Provides the current rate of drain in milliwatts from the battery.
remaining_capacity: u32Provides the remaining battery capacity in milliwatt-hours.
max_capacity: u32Provides the max capacity of the battery in milliwatt-hours
ac_online: boolIs ac online?
Implementations§
Source§impl HostBatteryUpdate
impl HostBatteryUpdate
Sourcepub fn default_present() -> Self
pub fn default_present() -> Self
Returns a default HostBatteryUpdate with the battery present and charging.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for HostBatteryUpdate
impl<'arbitrary> Arbitrary<'arbitrary> for HostBatteryUpdate
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moreSource§impl Clone for HostBatteryUpdate
impl Clone for HostBatteryUpdate
Source§fn clone(&self) -> HostBatteryUpdate
fn clone(&self) -> HostBatteryUpdate
Returns a duplicate 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 HostBatteryUpdate
impl Debug for HostBatteryUpdate
Source§impl Default for HostBatteryUpdate
impl Default for HostBatteryUpdate
Source§fn default() -> HostBatteryUpdate
fn default() -> HostBatteryUpdate
Returns the “default value” for a type. Read more
Source§impl DefaultEncoding for HostBatteryUpdate
impl DefaultEncoding for HostBatteryUpdate
Source§impl Inspect for HostBatteryUpdate
impl Inspect for HostBatteryUpdate
Source§impl PartialEq for HostBatteryUpdate
impl PartialEq for HostBatteryUpdate
Source§impl<'encoding> StructDecodeMetadata<'encoding, Resource> for HostBatteryUpdate
impl<'encoding> StructDecodeMetadata<'encoding, Resource> for HostBatteryUpdate
Source§impl StructEncodeMetadata<Resource> for HostBatteryUpdate
impl StructEncodeMetadata<Resource> for HostBatteryUpdate
Source§impl StructMetadata for HostBatteryUpdate
impl StructMetadata for HostBatteryUpdate
impl Copy for HostBatteryUpdate
impl Eq for HostBatteryUpdate
impl StructuralPartialEq for HostBatteryUpdate
Auto Trait Implementations§
impl Freeze for HostBatteryUpdate
impl RefUnwindSafe for HostBatteryUpdate
impl Send for HostBatteryUpdate
impl Sync for HostBatteryUpdate
impl Unpin for HostBatteryUpdate
impl UnwindSafe for HostBatteryUpdate
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
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>
§impl<T> MeshField for T
impl<T> MeshField for T
§impl<T> MeshPayload for T
impl<T> MeshPayload for T
§impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
impl<T> SerializeMessage for Twhere
T: 'static + MeshPayload + Send,
§fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
fn compute_message_size(&mut self, sizer: MessageSizer<'_>)
Computes the message size, as in [
MessageEncode::compute_message_size].§fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
fn write_message(self, writer: MessageWriter<'_, '_, Resource>)
Writes the message, as in [
MessageEncode::write_message].