pub trait GestureData: Copy + 'static {
// Required method
unsafe fn read(at: *const u8) -> Self;
}Expand description
What a gesture hands its handlers, as a Rust type.
The gesture’s own type decides this — a drag reports a DragValue, a
long press a bool — so a handler’s argument follows from the gesture it
is attached to rather than being a case anyone has to match on.
Implemented per type rather than derived: reading the bytes SwiftUI passes
is a decision about that Gesture.Value’s layout.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".