pub struct CommandRequest {
pub command: String,
pub parameter: String,
pub command_type: String,
}Expand description
A command request to send to the SwitchBot API.
For more details of each field, please refer to the SwitchBot documentation about device control commands.
§Examples
let command = CommandRequest {
command: "turnOn".into(),
..Default::default()
};Fields§
§command: StringThe command.
parameter: StringThe command parameters.
The default value is default.
command_type: StringThe command type.
The default value is command.
Trait Implementations§
Source§impl Debug for CommandRequest
impl Debug for CommandRequest
Source§impl Default for CommandRequest
impl Default for CommandRequest
Auto Trait Implementations§
impl Freeze for CommandRequest
impl RefUnwindSafe for CommandRequest
impl Send for CommandRequest
impl Sync for CommandRequest
impl Unpin for CommandRequest
impl UnwindSafe for CommandRequest
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