Struct vesync::device::VeSyncDevice[][src]

pub struct VeSyncDevice<'a> {
    pub deviceName: String,
    pub cid: String,
    pub deviceStatus: Status,
    pub connectionStatus: ConnectionStatus,
    pub account: &'a VeSyncAccount,
}

Fields

deviceName: Stringcid: StringdeviceStatus: StatusconnectionStatus: ConnectionStatusaccount: &'a VeSyncAccount

Implementations

impl<'a> VeSyncDevice<'a>[src]

pub fn from_id(account: &'a VeSyncAccount, cid: &str) -> Self[src]

pub fn update(&mut self) -> Result<(), ()>[src]

pub fn get_devices(
    account: &'a VeSyncAccount
) -> Result<Vec<VeSyncDevice<'_>>, ()>
[src]

pub fn device_on(&mut self) -> Result<(), ()>[src]

Turns the specified VeSyncDevice on. If the status is already on, nothing is done.

pub fn device_off(&mut self) -> Result<(), ()>[src]

Turns the specified VeSyncDevice off. If the status is already off, nothing is done.

pub fn device_toggle(&mut self) -> Result<(), ()>[src]

Toggles the specified VeSyncDevice’s state

pub fn details(&self) -> Result<Details, ()>[src]

pub fn energy_week(&self) -> Result<EnergyConsumption, ()>[src]

pub fn configurations(&self) -> Result<Configuration, ()>[src]

Trait Implementations

impl<'a> Debug for VeSyncDevice<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for VeSyncDevice<'a>

impl<'a> Send for VeSyncDevice<'a>

impl<'a> Sync for VeSyncDevice<'a>

impl<'a> Unpin for VeSyncDevice<'a>

impl<'a> UnwindSafe for VeSyncDevice<'a>

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> From<T> for T[src]

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

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.