pub struct LightCapabilities {
pub power: bool,
pub brightness: Option<LightValueRange>,
pub temperature: Option<LightValueRange>,
pub color: bool,
pub zones: bool,
}Expand description
Controls a standalone light driver can implement.
Optional ranges are the source of truth for UI controls. A driver must not advertise a control merely because the product is classified as a light.
Fields§
§power: boolWhether the driver can switch the light on and off.
brightness: Option<LightValueRange>Supported brightness range, if brightness is controllable.
temperature: Option<LightValueRange>Supported colour-temperature range, if temperature is controllable.
color: boolWhether the driver can set a colour.
zones: boolWhether the driver exposes independently-addressable zones.
Trait Implementations§
Source§impl Clone for LightCapabilities
impl Clone for LightCapabilities
Source§fn clone(&self) -> LightCapabilities
fn clone(&self) -> LightCapabilities
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 LightCapabilities
Source§impl Debug for LightCapabilities
impl Debug for LightCapabilities
Source§impl Default for LightCapabilities
impl Default for LightCapabilities
Source§fn default() -> LightCapabilities
fn default() -> LightCapabilities
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LightCapabilities
impl<'de> Deserialize<'de> for LightCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for LightCapabilities
Source§impl PartialEq for LightCapabilities
impl PartialEq for LightCapabilities
Source§impl Serialize for LightCapabilities
impl Serialize for LightCapabilities
impl StructuralPartialEq for LightCapabilities
Auto Trait Implementations§
impl Freeze for LightCapabilities
impl RefUnwindSafe for LightCapabilities
impl Send for LightCapabilities
impl Sync for LightCapabilities
impl Unpin for LightCapabilities
impl UnsafeUnpin for LightCapabilities
impl UnwindSafe for LightCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.