Struct vesync::device::VeSyncDevice [−][src]
Fields
deviceName: String
cid: String
deviceStatus: Status
connectionStatus: ConnectionStatus
account: &'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]
account: &'a VeSyncAccount
) -> Result<Vec<VeSyncDevice<'_>>, ()>
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
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]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub 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>,