[][src]Struct new_home_core::room::device::Device

pub struct Device {
    pub application: String,
    pub channel: String,
}

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.