pub struct Lighting {
pub enabled: bool,
pub color: Rgb,
pub brightness: u8,
}Expand description
Per-device RGB lighting: a single static color, brightness, and on/off. Deliberately basic — per-key effects are a later addition.
Crosses the agent↔GUI IPC (set_lighting), so field order is wire format —
changes require a PROTOCOL_VERSION bump (guarded by
openlogi-agent-core/tests/wire_format.rs).
Fields§
§enabled: boolMaster on/off for the device’s lighting. The color and brightness persist while disabled, so re-enabling restores the previous look.
color: RgbStatic color as 6 hex digits "RRGGBB" (no leading #). A value
that does not parse falls back to white on load — the same per-field
tolerance as brightness, because failing the whole load would
discard the user’s entire config (see the load_or_default callers).
brightness: u8Brightness percent, clamped to 0–100 on load.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lighting
impl<'de> Deserialize<'de> for Lighting
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 Lighting
impl StructuralPartialEq for Lighting
Auto Trait Implementations§
impl Freeze for Lighting
impl RefUnwindSafe for Lighting
impl Send for Lighting
impl Sync for Lighting
impl Unpin for Lighting
impl UnsafeUnpin for Lighting
impl UnwindSafe for Lighting
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.