[−][src]Struct new_home_core::room::device::Device
This struct symbols a single device in a room Rooms will be represented in a HashMap with the name of the room and another HashMap which consists of device names and this struct as the device
Fields
application: String
The name of the application, aka. client
channel: String
The channel on which the device runs. The channel is meant to be formatted as an URL. This URL is meant to contain the protocol, that the physical device speaks as the scheme, the GPIO pin number of the Raspberry PI or Arduino on which the physical device is connected as path and optional information for the application as the query part.
Example
The URL for an LED strip with the WS 2811 chipset, which is connected to the pin 18 and the mode BGR may look like this:
ws2811:///18?mode=bgr
and another i2c device on GPIO pin 13 will look like the following one
ic2:///13
Trait Implementations
impl Clone for Device
[src]
impl<'de> Deserialize<'de> for Device
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Device
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,