pub struct TuyaDevice { /* private fields */ }
Implementations§
Source§impl TuyaDevice
impl TuyaDevice
pub fn create(ver: &str, key: Option<&str>, addr: IpAddr) -> Result<TuyaDevice>
pub fn create_with_transport( ver: &str, key: Option<&str>, addr: IpAddr, transport: Transport, ) -> Result<TuyaDevice>
pub fn create_with_mp( mp: MessageParser, addr: IpAddr, transport: Transport, ) -> TuyaDevice
pub fn set(&self, tuya_payload: Payload, seq_id: u32) -> Result<()>
pub fn get(&self, tuya_payload: Payload, seq_id: u32) -> Result<Vec<Message>>
pub fn refresh( &self, tuya_payload: Payload, seq_id: u32, ) -> Result<Vec<Message>>
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