#[non_exhaustive]#[repr(u8)]pub enum BacklightStatus {
DisabledBySoftware = 0,
DisabledByCriticalBattery = 1,
AlsAutomatic = 2,
AlsSaturated = 3,
TemporaryManual = 4,
PermanentManual = 5,
}Expand description
The current backlight status from getBacklightInfo.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DisabledBySoftware = 0
Disabled by software.
DisabledByCriticalBattery = 1
Disabled because the battery is critically low.
AlsAutomatic = 2
Automatic (ALS) mode.
AlsSaturated = 3
Automatic mode, saturated — the backlight is off.
TemporaryManual = 4
Temporary manual mode (set by hardware).
PermanentManual = 5
Permanent manual mode (set by software).
Trait Implementations§
Source§impl Clone for BacklightStatus
impl Clone for BacklightStatus
Source§fn clone(&self) -> BacklightStatus
fn clone(&self) -> BacklightStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BacklightStatus
Source§impl Debug for BacklightStatus
impl Debug for BacklightStatus
impl Eq for BacklightStatus
Source§impl From<BacklightStatus> for u8
impl From<BacklightStatus> for u8
Source§fn from(enum_value: BacklightStatus) -> Self
fn from(enum_value: BacklightStatus) -> Self
Converts to this type from the input type.
Source§impl Hash for BacklightStatus
impl Hash for BacklightStatus
Source§impl PartialEq for BacklightStatus
impl PartialEq for BacklightStatus
impl StructuralPartialEq for BacklightStatus
Source§impl TryFrom<u8> for BacklightStatus
impl TryFrom<u8> for BacklightStatus
Source§type Error = TryFromPrimitiveError<BacklightStatus>
type Error = TryFromPrimitiveError<BacklightStatus>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for BacklightStatus
impl TryFromPrimitive for BacklightStatus
const NAME: &'static str = "BacklightStatus"
type Primitive = u8
type Error = TryFromPrimitiveError<BacklightStatus>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for BacklightStatus
impl RefUnwindSafe for BacklightStatus
impl Send for BacklightStatus
impl Sync for BacklightStatus
impl Unpin for BacklightStatus
impl UnsafeUnpin for BacklightStatus
impl UnwindSafe for BacklightStatus
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