pub struct Light<'a> { /* private fields */ }Expand description
A controllable bulb, strip, or other light device.
Implementations§
Source§impl<'a> Light<'a>
impl<'a> Light<'a>
pub fn new(bridge: &'a Bridge, data: LightData) -> Self
pub fn data(&self) -> &LightData
pub fn id(&self) -> &str
pub fn rid(&self) -> ResourceIdentifier
pub fn is_on(&self) -> bool
pub fn supports_color(&self) -> bool
pub async fn identify(&self) -> Result<Vec<ResourceIdentifier>, HueAPIError>
pub async fn alert(&self) -> Result<Vec<ResourceIdentifier>, HueAPIError>
pub async fn on(&self) -> Result<Vec<ResourceIdentifier>, HueAPIError>
pub async fn off(&self) -> Result<Vec<ResourceIdentifier>, HueAPIError>
pub async fn toggle(&self) -> Result<Vec<ResourceIdentifier>, HueAPIError>
pub async fn send( &self, commands: &[LightCommand], ) -> Result<Vec<ResourceIdentifier>, HueAPIError>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Light<'a>
impl<'a> !UnwindSafe for Light<'a>
impl<'a> Freeze for Light<'a>
impl<'a> Send for Light<'a>
impl<'a> Sync for Light<'a>
impl<'a> Unpin for Light<'a>
impl<'a> UnsafeUnpin for Light<'a>
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