Enum sep2_common::packages::power_status::BatteryStatus
source · #[repr(u8)]pub enum BatteryStatus {
Unknown = 0,
Normal = 1,
Low = 2,
Depleted = 3,
NotApplicable = 4,
}
Available on crate feature
power_status
only.Variants§
Unknown = 0
Normal = 1
More than LowChargeThreshold remaining
Low = 2
Less than LowChargeThreshold remaining
Depleted = 3
0% charge remaining
NotApplicable = 4
Mains Powered Only
Trait Implementations§
source§impl Clone for BatteryStatus
impl Clone for BatteryStatus
source§fn clone(&self) -> BatteryStatus
fn clone(&self) -> BatteryStatus
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 BatteryStatus
impl Debug for BatteryStatus
source§impl Default for BatteryStatus
impl Default for BatteryStatus
source§fn default() -> BatteryStatus
fn default() -> BatteryStatus
Returns the “default value” for a type. Read more
source§impl Ord for BatteryStatus
impl Ord for BatteryStatus
source§fn cmp(&self, other: &BatteryStatus) -> Ordering
fn cmp(&self, other: &BatteryStatus) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<BatteryStatus> for BatteryStatus
impl PartialEq<BatteryStatus> for BatteryStatus
source§fn eq(&self, other: &BatteryStatus) -> bool
fn eq(&self, other: &BatteryStatus) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<BatteryStatus> for BatteryStatus
impl PartialOrd<BatteryStatus> for BatteryStatus
source§fn partial_cmp(&self, other: &BatteryStatus) -> Option<Ordering>
fn partial_cmp(&self, other: &BatteryStatus) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl YaDeserialize for BatteryStatus
impl YaDeserialize for BatteryStatus
source§impl YaSerialize for BatteryStatus
impl YaSerialize for BatteryStatus
fn name() -> &'static strwhere Self: Sized,
fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>where Self: Sized,
fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace ) -> Result<(Vec<OwnedAttribute>, Namespace), String>where Self: Sized,
impl Copy for BatteryStatus
impl Eq for BatteryStatus
impl StructuralEq for BatteryStatus
impl StructuralPartialEq for BatteryStatus
Auto Trait Implementations§
impl RefUnwindSafe for BatteryStatus
impl Send for BatteryStatus
impl Sync for BatteryStatus
impl Unpin for BatteryStatus
impl UnwindSafe for BatteryStatus
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