#[non_exhaustive]pub struct LightSnapshot {
pub on: bool,
pub brightness: u8,
pub rendered_brightness: u8,
pub color_mode: ColorMode,
pub hue: u8,
pub saturation: u8,
pub enhanced_hue: u16,
pub color_x: u16,
pub color_y: u16,
pub color_temp_mireds: u16,
}Expand description
Complete raw light state handed to LightOutput::state_update after every
render pass.
Unlike SceneState (a partial snapshot for Zigbee scene storage, where
absent fields mean “don’t touch”), every field here is always present — no
Options to unwrap. All values are raw ZCL domains.
#[non_exhaustive]: backends receive this by reference and read its fields,
so new state (e.g. a future color-loop phase) can be added without a breaking
release. It does mean the struct can’t be constructed with a literal outside
this crate — not a use case, since only the state machine produces it.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.on: bool§brightness: u8Logical level (0-254): the target the light is at or heading to. Stays put during an on/off fade.
rendered_brightness: u8The level actually being driven right now (0-254): ramps frame by frame during fades and transitions — key effects off this one to follow what the LED is visibly doing.
color_mode: ColorMode§hue: u8§saturation: u8§enhanced_hue: u16§color_x: u16§color_y: u16§color_temp_mireds: u16Trait Implementations§
Source§impl Clone for LightSnapshot
impl Clone for LightSnapshot
Source§fn clone(&self) -> LightSnapshot
fn clone(&self) -> LightSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LightSnapshot
Source§impl Debug for LightSnapshot
impl Debug for LightSnapshot
impl Eq for LightSnapshot
Source§impl PartialEq for LightSnapshot
impl PartialEq for LightSnapshot
Source§fn eq(&self, other: &LightSnapshot) -> bool
fn eq(&self, other: &LightSnapshot) -> bool
self and other values to be equal, and is used by ==.