pub struct Device {
pub id: DeviceID,
pub room_id: RoomID,
pub password_hash: String,
pub device_type: DeviceType,
pub traits: Vec<DeviceTrait>,
pub name: String,
pub will_push_state: bool,
pub model: String,
pub hw_version: Version,
pub sw_version: Version,
pub attributes: HashMap<String, Option<String>>,
}Fields§
§id: DeviceIDIdentifier of the device
room_id: RoomIDName of room(if available)
password_hash: StringHashed password for device
device_type: DeviceTypeType of the device
traits: Vec<DeviceTrait>Functionatily that the device has
name: StringName of the device
will_push_state: boolTrue if device will push state by itself, otherwise will use polling
model: StringThe model or SKU identifier of the device
hw_version: VersionSpecific version number of hardware of the device
sw_version: VersionSpecific version number of software of the device
attributes: HashMap<String, Option<String>>Aligned with per-trait attributes described in each trait schema reference.
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
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
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