pub struct SemanticsNode {Show 15 fields
pub node_id: NodeId,
pub role: SemanticsRole,
pub widget_role: Option<SemanticsWidgetRole>,
pub actions: Vec<SemanticsAction>,
pub children: Vec<SemanticsNode>,
pub description: Option<String>,
pub state_description: Option<String>,
pub on_click_label: Option<String>,
pub selected: Option<bool>,
pub toggled: Option<bool>,
pub enabled: bool,
pub custom_actions: Vec<SemanticsCustomAction>,
pub canvas_children: Vec<CanvasSemanticsNode>,
pub editable_text: bool,
pub text_selection: Option<TextRange>,
}Expand description
A single node within the semantics tree.
Not Eq: a node now carries drawn-control bounds, which are floats. The
tree is compared for “did anything a screen reader can see change”, and
that comparison is PartialEq everywhere else on the accessibility path
(AccessibilityRect, AccessibilityElement) for the same reason.
Fields§
§node_id: NodeId§role: SemanticsRoleWhere this node sits in the tree (layout, text, subcomposition …).
widget_role: Option<SemanticsWidgetRole>What kind of control this node is, as a screen reader announces it —
Compose’s Role. Separate from SemanticsNode::role because a
clickable Row is structurally a layout node and semantically a button.
actions: Vec<SemanticsAction>§children: Vec<SemanticsNode>§description: Option<String>§state_description: Option<String>§on_click_label: Option<String>§selected: Option<bool>§toggled: Option<bool>§enabled: bool§custom_actions: Vec<SemanticsCustomAction>§canvas_children: Vec<CanvasSemanticsNode>Controls this node drew rather than laid out; their bounds are relative
to this node’s own top-left. See CanvasSemanticsNode.
editable_text: bool§text_selection: Option<TextRange>Trait Implementations§
Source§impl Clone for SemanticsNode
impl Clone for SemanticsNode
Source§fn clone(&self) -> SemanticsNode
fn clone(&self) -> SemanticsNode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SemanticsNode
impl Debug for SemanticsNode
Source§impl Default for SemanticsNode
impl Default for SemanticsNode
Source§impl PartialEq for SemanticsNode
impl PartialEq for SemanticsNode
impl StructuralPartialEq for SemanticsNode
Auto Trait Implementations§
impl !RefUnwindSafe for SemanticsNode
impl !Send for SemanticsNode
impl !Sync for SemanticsNode
impl !UnwindSafe for SemanticsNode
impl Freeze for SemanticsNode
impl Unpin for SemanticsNode
impl UnsafeUnpin for SemanticsNode
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