[][src]Struct dss::Appartement

pub struct Appartement { /* fields omitted */ }

The appartment gives you a easy and highlevel interface to a dss installation. It's the main struct this crates provides.

Please only use this interaface to a dss installation and not any other interface to the same installation at the same time. This crate is buffering information to keep the dss actions reponse times somewhat decent. Also don't use the RawAPI directly, because it has the same effect as using another interface and is leading to mismathcing data. This is unfortunatelly due to the really bad designed API from DSS.

Methods

impl Appartement[src]

pub fn connect<S>(host: S, user: S, password: S) -> Result<Appartement, Error> where
    S: Into<String>, 
[src]

Connect to a DSS installation and fetch the complete structure of it. Based on your appartment size, this can take around a minute.

pub fn get_zones(&self) -> Result<Vec<Zone>, Error>[src]

Returns an vector of all zones with their groups.

Keep in mind, that the values are in a frozen state. If you want to stay informed about changes, use the 'event_channel()' function.

pub fn update_all(&self) -> Result<Vec<Zone>, Error>[src]

Updates the complete appartment structure, this command can take some time to execute (more than 30 seconds).

Use the 'get_zones()' function to get the actual structure with updates values for each group.

pub fn set_value(
    &self,
    zone: usize,
    group: Option<usize>,
    value: Value
) -> Result<(), Error>
[src]

pub fn event_channel(&self) -> Result<Receiver<Event>, Error>[src]

Get the event channel for the appartment.

When a channel is already open for this apparment, we close the open one and create a new one which gets returned. Therefore it's not recommended to call this function twice for one appartment.

Trait Implementations

impl Clone for Appartement[src]

impl Debug for Appartement[src]

Auto Trait Implementations

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> Erased for T

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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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