pub struct Device {
pub device: String,
pub sku: String,
pub device_name: String,
pub device_type: Option<String>,
pub capabilities: Vec<Capability>,
}Expand description
A Govee device or device group
Fields§
§device: StringDevice/group identifier
sku: StringSKU/model identifier
device_name: StringUser-friendly device name
device_type: Option<String>Device type (e.g., “devices.types.light”), None for groups
capabilities: Vec<Capability>List of capabilities this device supports
Implementations§
Source§impl Device
impl Device
Sourcepub fn is_group(&self) -> bool
pub fn is_group(&self) -> bool
Returns true if this is a device group (not an individual device)
Sourcepub fn supports_power(&self) -> bool
pub fn supports_power(&self) -> bool
Returns true if the device supports on/off control
Sourcepub fn supports_brightness(&self) -> bool
pub fn supports_brightness(&self) -> bool
Returns true if the device supports brightness control
Sourcepub fn supports_color(&self) -> bool
pub fn supports_color(&self) -> bool
Returns true if the device supports RGB color control
Sourcepub fn supports_color_temp(&self) -> bool
pub fn supports_color_temp(&self) -> bool
Returns true if the device supports color temperature control
Sourcepub fn supports_scenes(&self) -> bool
pub fn supports_scenes(&self) -> bool
Returns true if the device supports dynamic light scenes
Sourcepub fn supports_segments(&self) -> bool
pub fn supports_segments(&self) -> bool
Returns true if the device supports per-segment color/brightness control
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Device
impl<'de> Deserialize<'de> for Device
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
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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