pub enum ShellyDevice {
Gen1(Gen1Device),
Gen2(Gen2Device),
}Variants§
Gen1(Gen1Device)
Gen2(Gen2Device)
Implementations§
Source§impl ShellyDevice
impl ShellyDevice
pub fn info(&self) -> &DeviceInfo
pub async fn status(&self) -> Result<DeviceStatus>
pub async fn switch_status(&self, id: u8) -> Result<SwitchStatus>
pub async fn switch_set(&self, id: u8, on: bool) -> Result<SwitchResult>
pub async fn switch_toggle(&self, id: u8) -> Result<SwitchResult>
pub async fn light_components(&self) -> Result<Vec<LightComponent>>
pub async fn light_set( &self, kind: LightKind, id: u8, params: &LightParams, ) -> Result<SwitchResult>
pub async fn light_toggle( &self, kind: LightKind, id: u8, ) -> Result<SwitchResult>
pub async fn light_status(&self, kind: LightKind, id: u8) -> Result<LightStatus>
pub async fn power(&self, id: u8) -> Result<PowerReading>
pub async fn firmware_check(&self) -> Result<FirmwareInfo>
pub async fn config_get(&self) -> Result<Value>
pub async fn reboot(&self) -> Result<()>
pub async fn firmware_update(&self) -> Result<()>
pub async fn config_set(&self, key: &str, value: &str) -> Result<Value>
pub async fn schedule_list(&self) -> Result<Value>
pub async fn webhook_list(&self) -> Result<Value>
pub async fn config_restore(&self, config: &Value) -> Result<()>
pub async fn set_name(&self, name: &str) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for ShellyDevice
impl !UnwindSafe for ShellyDevice
impl Freeze for ShellyDevice
impl Send for ShellyDevice
impl Sync for ShellyDevice
impl Unpin for ShellyDevice
impl UnsafeUnpin for ShellyDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more