Struct rust_tuyapi::PayloadStruct
source · pub struct PayloadStruct {
pub dev_id: String,
pub gw_id: Option<String>,
pub uid: Option<String>,
pub t: Option<u32>,
pub dp_id: Option<Vec<u8>>,
pub dps: Option<HashMap<String, Value>>,
}
Expand description
The PayloadStruct is Serialized to json and sent to the device. The dps field contains the actual commands to set and are device specific.
Fields§
§dev_id: String
§gw_id: Option<String>
§uid: Option<String>
§t: Option<u32>
§dp_id: Option<Vec<u8>>
§dps: Option<HashMap<String, Value>>
Trait Implementations§
source§impl Clone for PayloadStruct
impl Clone for PayloadStruct
source§fn clone(&self) -> PayloadStruct
fn clone(&self) -> PayloadStruct
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PayloadStruct
impl Debug for PayloadStruct
source§impl<'de> Deserialize<'de> for PayloadStruct
impl<'de> Deserialize<'de> for PayloadStruct
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PayloadStruct
impl Display for PayloadStruct
source§impl PartialEq<PayloadStruct> for PayloadStruct
impl PartialEq<PayloadStruct> for PayloadStruct
source§fn eq(&self, other: &PayloadStruct) -> bool
fn eq(&self, other: &PayloadStruct) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PayloadStruct
impl Serialize for PayloadStruct
source§impl Truncate for PayloadStruct
impl Truncate for PayloadStruct
fn truncate(&self) -> PayloadStruct
source§fn truncate_str(text: &str) -> &str
fn truncate_str(text: &str) -> &str
Take the last 5 characters