#[non_exhaustive]pub enum DeviceValue {
Undefined,
Off,
On(DeviceBrightness),
AllOff,
AllOn,
}
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.
Implementations§
Source§impl DeviceValue
impl DeviceValue
pub fn is_on(&self) -> bool
pub fn brightness(&self) -> Option<DeviceBrightness>
Trait Implementations§
Source§impl Clone for DeviceValue
impl Clone for DeviceValue
Source§fn clone(&self) -> DeviceValue
fn clone(&self) -> DeviceValue
Returns a duplicate 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 DeviceValue
impl Debug for DeviceValue
Source§impl Default for DeviceValue
impl Default for DeviceValue
Source§impl Display for DeviceValue
impl Display for DeviceValue
Source§impl From<(DeviceState, DeviceBrightness)> for DeviceValue
impl From<(DeviceState, DeviceBrightness)> for DeviceValue
Source§fn from((state, brightness): (DeviceState, DeviceBrightness)) -> Self
fn from((state, brightness): (DeviceState, DeviceBrightness)) -> Self
Converts to this type from the input type.
Source§impl From<DeviceState> for DeviceValue
impl From<DeviceState> for DeviceValue
Source§fn from(state: DeviceState) -> Self
fn from(state: DeviceState) -> Self
Converts to this type from the input type.
Source§impl Hash for DeviceValue
impl Hash for DeviceValue
Source§impl PartialEq for DeviceValue
impl PartialEq for DeviceValue
Source§impl PartialOrd for DeviceValue
impl PartialOrd for DeviceValue
Source§impl TryFrom<ItemUpdateValue> for DeviceValue
impl TryFrom<ItemUpdateValue> for DeviceValue
Source§type Error = ItemUpdateValue
type Error = ItemUpdateValue
The type returned in the event of a conversion error.
impl Copy for DeviceValue
impl Eq for DeviceValue
impl StructuralPartialEq for DeviceValue
Auto Trait Implementations§
impl Freeze for DeviceValue
impl RefUnwindSafe for DeviceValue
impl Send for DeviceValue
impl Sync for DeviceValue
impl Unpin for DeviceValue
impl UnwindSafe for DeviceValue
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