pub trait InteractionQuery {
// Required methods
fn focus_target(&self) -> Option<SourceNodeId>;
fn selection(&self) -> Option<Selection>;
fn affordances_at(&self, point: Point) -> Vec<Affordance>;
fn activation_target(&self, point: Point) -> Option<SourceNodeId>;
}Expand description
Common-minimum interaction queries every lane publishes.
Required Methods§
Sourcefn focus_target(&self) -> Option<SourceNodeId>
fn focus_target(&self) -> Option<SourceNodeId>
Current focused node, if any.
Sourcefn selection(&self) -> Option<Selection>
fn selection(&self) -> Option<Selection>
Current selection (the active range across the lane’s source).
Sourcefn affordances_at(&self, point: Point) -> Vec<Affordance>
fn affordances_at(&self, point: Point) -> Vec<Affordance>
Affordances at a point — what kinds of interaction the user can perform here (link, button, scrollable, editable, etc.). Returns multiple entries for stacked affordances (e.g., a link inside a scrollable region — both are reachable).
Sourcefn activation_target(&self, point: Point) -> Option<SourceNodeId>
fn activation_target(&self, point: Point) -> Option<SourceNodeId>
What gets activated when the user clicks at point.
Distinct from affordances_at — affordances is “what’s
possible”, activation_target is “what would happen on
default-click.”
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".