pub enum SimulatorRawGesture {
Tap {
intensity: f32,
},
DoubleTap,
Hold {
start_time: u64,
},
Slide {
direction: SlideDirection,
distance: u32,
},
Tilt {
angle: f32,
},
}Expand description
Raw gestures emitted by the simulator matching the requested schema.
Variants§
Implementations§
Source§impl SimulatorRawGesture
impl SimulatorRawGesture
Sourcepub fn into_gesture(self) -> Gesture
pub fn into_gesture(self) -> Gesture
Safely normalize the proprietary BLE enum into the generic Gesture struct,
explicitly isolating intent parsing to the gestura-core-intent crate layer.
gesture_type is always one of a bounded closed set that aligns exactly
with the strings recognised by gestura-core-intent::gesture_to_action:
tap, double_tap, hold, tilt_up, tilt_down, tilt_left,
tilt_right.
Slide directions are mapped to the corresponding tilt_* string so
they route to meaningful actions (scroll_up, scroll_down, previous,
next) instead of falling through to unknown_gesture.
Physical Tilt direction is derived from the sign of the angle field:
non-negative → tilt_right, negative → tilt_left.
Numeric values (intensity, distance, angle) are carried in the
acceleration/gyroscope sensor fields so downstream normalisation
never needs to parse the type string.
Trait Implementations§
Source§impl Clone for SimulatorRawGesture
impl Clone for SimulatorRawGesture
Source§fn clone(&self) -> SimulatorRawGesture
fn clone(&self) -> SimulatorRawGesture
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more