pub trait NameOfEvent:
Clone
+ PartialEq
+ Eq
+ Hash
+ Copy
+ Debug
+ Eq
+ Ord {
Show 15 methods
// 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 new_exclusive_leave() -> Self;
fn new_exclusive_enter() -> Self;
fn get_derived_events(&self) -> HashSet<Self>;
// Provided methods
fn is_exclusive_enter(&self) -> bool { ... }
fn is_exclusive_leave(&self) -> bool { ... }
fn get_global_events(&self) -> HashSet<Self> { ... }
fn get_cancellable_events(&self) -> HashSet<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 new_exclusive_leave() -> Self
fn new_exclusive_leave() -> Self
Create a new exclusive leave event for when the deepest (entered) node changes without the node necessarily leaving the cursor area entirely.
Sourcefn new_exclusive_enter() -> Self
fn new_exclusive_enter() -> Self
Create a new exclusive leave event for when the deepest (entered) node changes without the node necessarily leaving the cursor area entirely.
Sourcefn get_derived_events(&self) -> HashSet<Self>
fn get_derived_events(&self) -> HashSet<Self>
Get a set of events derived from this event. For example, mouse movement derives into mouse movement + mouse enter.
Provided Methods§
Sourcefn is_exclusive_enter(&self) -> bool
fn is_exclusive_enter(&self) -> bool
Check if this enter event should only fire on the deepest (most specific) node, not on all nodes under the cursor simultaneously.
Sourcefn is_exclusive_leave(&self) -> bool
fn is_exclusive_leave(&self) -> bool
Check if this leave event corresponds to an exclusive enter
Sourcefn get_global_events(&self) -> HashSet<Self>
fn get_global_events(&self) -> HashSet<Self>
Get a set of global events derived from this event.
Sourcefn get_cancellable_events(&self) -> HashSet<Self>
fn get_cancellable_events(&self) -> HashSet<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.