pub enum SensorCommand {
StartListening {
id: String,
source: String,
},
StopListening {
id: String,
},
SetSensitivity {
id: String,
value: f32,
},
Calibrate {
id: String,
kind: CalibrationKind,
},
SetEnabled {
id: String,
enabled: bool,
},
}Expand description
Commands for controlling sensors (physical input devices).
Variants§
StartListening
Start listening to a sensor data source.
StopListening
Stop listening to a sensor.
SetSensitivity
Set sensor sensitivity.
Calibrate
Calibrate a sensor.
SetEnabled
Enable or disable a sensor.
Implementations§
Trait Implementations§
Source§impl Clone for SensorCommand
impl Clone for SensorCommand
Source§fn clone(&self) -> SensorCommand
fn clone(&self) -> SensorCommand
Returns a duplicate 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 SensorCommand
impl Debug for SensorCommand
Source§impl Display for SensorCommand
impl Display for SensorCommand
Source§impl From<SensorCommand> for CommandEnum
impl From<SensorCommand> for CommandEnum
Source§fn from(cmd: SensorCommand) -> Self
fn from(cmd: SensorCommand) -> Self
Converts to this type from the input type.
Source§impl TryFrom<CommandEnum> for SensorCommand
impl TryFrom<CommandEnum> for SensorCommand
impl Command for SensorCommand
Auto Trait Implementations§
impl Freeze for SensorCommand
impl RefUnwindSafe for SensorCommand
impl Send for SensorCommand
impl Sync for SensorCommand
impl Unpin for SensorCommand
impl UnsafeUnpin for SensorCommand
impl UnwindSafe for SensorCommand
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