pub enum BatteryInfo {
NotAvailable,
Battery(BatteryLevel),
External,
}
Variants§
NotAvailable
No battery information is available.
Battery(BatteryLevel)
Currently on battery power with a specified level percentage.
External
Currently on an external power source.
Implementations§
Trait Implementations§
Source§impl Clone for BatteryInfo
impl Clone for BatteryInfo
Source§fn clone(&self) -> BatteryInfo
fn clone(&self) -> BatteryInfo
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 BatteryInfo
impl Debug for BatteryInfo
Source§impl PartialEq for BatteryInfo
impl PartialEq for BatteryInfo
Source§impl TryFrom<BatteryInfo> for BatteryInfo
impl TryFrom<BatteryInfo> for BatteryInfo
Source§type Error = BatteryClientError
type Error = BatteryClientError
The type returned in the event of a conversion error.
impl StructuralPartialEq for BatteryInfo
Auto Trait Implementations§
impl Freeze for BatteryInfo
impl RefUnwindSafe for BatteryInfo
impl Send for BatteryInfo
impl Sync for BatteryInfo
impl Unpin for BatteryInfo
impl UnwindSafe for BatteryInfo
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)