pub enum Command {
Actuate {
target: String,
action: String,
},
AddGroup {
org: String,
group: Group,
},
RemoveGroup {
id: String,
},
AddSensor {
group: String,
sensor: Sensor,
binding: Option<String>,
},
RemoveSensor {
target: String,
},
}Expand description
A control action a client asks the node to take.
The provisioning variants carry the group or sensor the client built, so the device records the structure the operator described; the device owns and shares it across every client.
Variants§
Actuate
Set a discrete actuator to one of its actions, such as opening a valve.
Fields
AddGroup
Add a group to an organization.
RemoveGroup
Remove a group by id.
AddSensor
Add a sensor to a group.
Fields
RemoveSensor
Remove a sensor by its "groupId/sensorId" path.
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 Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin 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