#[non_exhaustive]#[repr(u8)]pub enum BacklightMode {
None = 0,
Automatic = 1,
TemporaryManual = 2,
PermanentManual = 3,
}Expand description
The backlight level-adjustment mode.
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.
None = 0
No mode selected.
Automatic = 1
Automatic mode: level follows the ambient-light sensor.
TemporaryManual = 2
Temporary manual mode: level adjusted via the backlight keys. This mode cannot be set by software.
PermanentManual = 3
Permanent manual mode: level adjusted by software.
Trait Implementations§
Source§impl Clone for BacklightMode
impl Clone for BacklightMode
Source§fn clone(&self) -> BacklightMode
fn clone(&self) -> BacklightMode
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 BacklightMode
Source§impl Debug for BacklightMode
impl Debug for BacklightMode
impl Eq for BacklightMode
Source§impl From<BacklightMode> for u8
impl From<BacklightMode> for u8
Source§fn from(enum_value: BacklightMode) -> Self
fn from(enum_value: BacklightMode) -> Self
Converts to this type from the input type.
Source§impl Hash for BacklightMode
impl Hash for BacklightMode
Source§impl PartialEq for BacklightMode
impl PartialEq for BacklightMode
impl StructuralPartialEq for BacklightMode
Source§impl TryFrom<u8> for BacklightMode
impl TryFrom<u8> for BacklightMode
Source§type Error = TryFromPrimitiveError<BacklightMode>
type Error = TryFromPrimitiveError<BacklightMode>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for BacklightMode
impl TryFromPrimitive for BacklightMode
const NAME: &'static str = "BacklightMode"
type Primitive = u8
type Error = TryFromPrimitiveError<BacklightMode>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
Auto Trait Implementations§
impl Freeze for BacklightMode
impl RefUnwindSafe for BacklightMode
impl Send for BacklightMode
impl Sync for BacklightMode
impl Unpin for BacklightMode
impl UnsafeUnpin for BacklightMode
impl UnwindSafe for BacklightMode
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