pub struct TuyaDevice { /* private fields */ }
Implementations§
Source§impl TuyaDevice
impl TuyaDevice
pub fn new( ver: &str, device_id: &str, key: Option<&str>, addr: IpAddr, ) -> Result<TuyaDevice>
pub async fn connect(&mut self) -> Result<Receiver<Result<Vec<Message>>>>
pub async fn set(&mut self, tuya_payload: Payload) -> Result<()>
pub async fn set_values(&mut self, dps: Value) -> Result<()>
pub async fn get(&mut self, tuya_payload: Payload) -> Result<()>
pub async fn refresh(&mut self, tuya_payload: Payload) -> Result<()>
pub async fn send_msg(&mut self, msg: Message) -> Result<()>
Auto Trait Implementations§
impl Freeze for TuyaDevice
impl RefUnwindSafe for TuyaDevice
impl Send for TuyaDevice
impl Sync for TuyaDevice
impl Unpin for TuyaDevice
impl UnwindSafe for TuyaDevice
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