pub enum PowerReading<T> {
Known(T),
Unsupported,
Unknown,
}Expand description
One power reading, or the reason there is no value.
The distinction matters: a desktop with no battery is not a device at 100%, and an application that treats it as one refuses to run its own work on a machine that is plugged into the wall.
Variants§
Known(T)
The platform reported this value.
Unsupported
This platform has no API for it.
Unknown
The platform has the API but has not reported a value yet.
Implementations§
Trait Implementations§
Source§impl<T: Clone> Clone for PowerReading<T>
impl<T: Clone> Clone for PowerReading<T>
impl<T: Copy> Copy for PowerReading<T>
Source§impl<T: Debug> Debug for PowerReading<T>
impl<T: Debug> Debug for PowerReading<T>
impl<T: Eq> Eq for PowerReading<T>
Source§impl<T: PartialEq> PartialEq for PowerReading<T>
impl<T: PartialEq> PartialEq for PowerReading<T>
impl<T: PartialEq> StructuralPartialEq for PowerReading<T>
Auto Trait Implementations§
impl<T> Freeze for PowerReading<T>where
T: Freeze,
impl<T> RefUnwindSafe for PowerReading<T>where
T: RefUnwindSafe,
impl<T> Send for PowerReading<T>where
T: Send,
impl<T> Sync for PowerReading<T>where
T: Sync,
impl<T> Unpin for PowerReading<T>where
T: Unpin,
impl<T> UnsafeUnpin for PowerReading<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PowerReading<T>where
T: UnwindSafe,
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