Struct fundamentum_sdk_mqtt::models::Command
source · pub struct Command { /* private fields */ }Expand description
Command definition
Implementations§
source§impl Command
impl Command
sourcepub const fn device_command_id(&self) -> u64
pub const fn device_command_id(&self) -> u64
Returns unique device command’s id
sourcepub const fn command_short_name(&self) -> &String
pub const fn command_short_name(&self) -> &String
Returns unique command’s short name
sourcepub fn parameters<T>(&self) -> Result<T, Error>where
T: DeserializeOwned,
pub fn parameters<T>(&self) -> Result<T, Error>where T: DeserializeOwned,
Command’s parameters
Errors
This conversion can fail if the structure of the Value does not match the
structure expected by T, for example if T is a struct type but the Value
contains something other than a JSON map. It can also fail if the structure
is correct but T’s implementation of Deserialize decides that something
is wrong with the data, for example required struct fields are missing from
the JSON map or some number is too big to fit in the expected primitive
type.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
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
Auto Trait Implementations§
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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