pub trait NameOfEvent:
Clone
+ PartialEq
+ Eq
+ Hash
+ Copy
+ Debug
+ Eq
+ Ord {
// Required methods
fn is_moved(&self) -> bool;
fn is_enter(&self) -> bool;
fn is_pressed(&self) -> bool;
fn is_released(&self) -> bool;
fn is_global(&self) -> bool;
fn does_bubble(&self) -> bool;
fn does_go_through_solid(&self) -> bool;
fn new_leave() -> Self;
fn get_derived_events(&self) -> Vec<Self>;
// Provided methods
fn get_global_events(&self) -> Vec<Self> { ... }
fn get_cancellable_events(&self) -> Vec<Self> { ... }
}
Required Methods§
Sourcefn is_moved(&self) -> bool
fn is_moved(&self) -> bool
Check if this event means that the pointer device as moved while hovering a node.
Sourcefn is_enter(&self) -> bool
fn is_enter(&self) -> bool
Check if this event means that the pointer device started hovering a node.
Sourcefn is_pressed(&self) -> bool
fn is_pressed(&self) -> bool
Check if this event means that the pointer device was pressed while hovering a node.
Sourcefn is_released(&self) -> bool
fn is_released(&self) -> bool
Check if this event means that the pointer device was released while hovering and hovering a node.
Sourcefn is_global(&self) -> bool
fn is_global(&self) -> bool
Check if this event is global, where global means that an event will be emitted to every node independently of where they are or how they are.
Sourcefn does_bubble(&self) -> bool
fn does_bubble(&self) -> bool
Check if this event bubbles, where bubbling means that an ancestor of the event node will be called with the same event unless the event node stops the bubbling.
Sourcefn does_go_through_solid(&self) -> bool
fn does_go_through_solid(&self) -> bool
Check if this event can go through solid surfaces, e.g keyboard events.
Sourcefn get_derived_events(&self) -> Vec<Self>
fn get_derived_events(&self) -> Vec<Self>
Get a set of events derived from this event. For example, mouse movement derives into mouse movement + mouse enter.
Provided Methods§
Sourcefn get_global_events(&self) -> Vec<Self>
fn get_global_events(&self) -> Vec<Self>
Get a set of global events derived from this event.
Sourcefn get_cancellable_events(&self) -> Vec<Self>
fn get_cancellable_events(&self) -> Vec<Self>
Get a set of events that will be discarded once this event is cancelled.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.