pub enum Device {
Blind(DeviceData),
Controller(DeviceData),
Gateway(DeviceData),
Light(DeviceData),
Outlet(DeviceData),
Sensor(DeviceData),
}Expand description
A Device is a resource that is able to connect to the IKEA Dirigera hub - or the actual hub
itself. It’s represented as an enum with one variant for each type rather than separate types
for each content since the data for the devices are shared.
Variants§
Blind(DeviceData)
Controller(DeviceData)
Gateway(DeviceData)
Light(DeviceData)
Outlet(DeviceData)
Sensor(DeviceData)
Implementations§
source§impl Device
impl Device
sourcepub fn inner(&self) -> &DeviceData
pub fn inner(&self) -> &DeviceData
Get a reference to the DeviceData for the Device.
sourcepub fn inner_mut(&mut self) -> &mut DeviceData
pub fn inner_mut(&mut self) -> &mut DeviceData
Get a mutable reference to the DeviceData for the Device.
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
source§impl PartialEq for Device
impl PartialEq for Device
source§impl PartialOrd for Device
impl PartialOrd for Device
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl StructuralPartialEq for Device
Auto Trait Implementations§
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin 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