pub enum NativeCallback {
Pointer {
node_id: NodeId,
event_type: String,
x: f32,
y: f32,
},
Keyboard {
node_id: NodeId,
event_type: String,
key: String,
code: String,
},
FocusChange {
previous: Option<NodeId>,
current: NodeId,
},
Navigation {
action: String,
url: Option<String>,
},
Scroll {
node_id: NodeId,
offset_x: f32,
offset_y: f32,
},
TextChange {
node_id: NodeId,
text: String,
},
}Expand description
A callback event dispatched synchronously from Rust → JS. These are the native events that React needs to respond to immediately.
Variants§
Pointer
Touch/pointer event on a node.
Keyboard
Keyboard event.
FocusChange
Focus change event.
Navigation event (back button, deep link).
Scroll
Scroll event.
TextChange
Text input change.
Trait Implementations§
Source§impl Clone for NativeCallback
impl Clone for NativeCallback
Source§fn clone(&self) -> NativeCallback
fn clone(&self) -> NativeCallback
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 NativeCallback
impl Debug for NativeCallback
Source§impl<'de> Deserialize<'de> for NativeCallback
impl<'de> Deserialize<'de> for NativeCallback
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 NativeCallback
impl RefUnwindSafe for NativeCallback
impl Send for NativeCallback
impl Sync for NativeCallback
impl Unpin for NativeCallback
impl UnsafeUnpin for NativeCallback
impl UnwindSafe for NativeCallback
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