pub struct LightSettings {
pub enabled: bool,
pub auto_camera: bool,
pub brightness_percent: u8,
pub temperature_kelvin: Option<u16>,
pub color: Option<Rgb>,
}Expand description
Persisted settings for a standalone light such as Logitech Litra.
Brightness is stored as a normalized percentage so the same config shape works for lumen-based, percentage-based, and stepped light protocols. The selected driver maps it to its native range when applying the setting.
Fields§
§enabled: boolWhether the light should be on.
auto_camera: boolLink power to aggregate host-camera activity. This is a policy setting: brightness, colour temperature, and the persisted manual power choice remain independent from the transient effective power state.
brightness_percent: u8Brightness across the device’s advertised range.
temperature_kelvin: Option<u16>Desired colour temperature, when the device supports it.
color: Option<Rgb>Optional colour for a driver that exposes RGB controls.
Implementations§
Trait Implementations§
Source§impl Clone for LightSettings
impl Clone for LightSettings
Source§fn clone(&self) -> LightSettings
fn clone(&self) -> LightSettings
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 LightSettings
Source§impl Debug for LightSettings
impl Debug for LightSettings
Source§impl Default for LightSettings
impl Default for LightSettings
Source§impl<'de> Deserialize<'de> for LightSettings
impl<'de> Deserialize<'de> for LightSettings
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 LightSettings
Source§impl PartialEq for LightSettings
impl PartialEq for LightSettings
Source§impl Serialize for LightSettings
impl Serialize for LightSettings
impl StructuralPartialEq for LightSettings
Auto Trait Implementations§
impl Freeze for LightSettings
impl RefUnwindSafe for LightSettings
impl Send for LightSettings
impl Sync for LightSettings
impl Unpin for LightSettings
impl UnsafeUnpin for LightSettings
impl UnwindSafe for LightSettings
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.