pub struct A11yNode {
pub id: NodeId,
pub role: A11yRole,
pub name: String,
pub description: Option<String>,
pub states: States,
pub parent: Option<NodeId>,
pub relations: Vec<Relation>,
}Expand description
One semantic node.
Fields§
§id: NodeIdIdentity.
role: A11yRoleSemantic role.
name: StringAccessible name (required for interactive roles).
description: Option<String>Longer description.
states: StatesState flags.
parent: Option<NodeId>Structural parent (None for a root).
relations: Vec<Relation>Non-structural relations.
Implementations§
Source§impl A11yNode
impl A11yNode
Sourcepub fn new(id: NodeId, role: A11yRole, name: impl Into<String>) -> Self
pub fn new(id: NodeId, role: A11yRole, name: impl Into<String>) -> Self
A node with the common fields; states/relations default empty.
Sourcepub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
Attach a description.
Sourcepub fn with_states(self, states: States) -> Self
pub fn with_states(self, states: States) -> Self
Set states.
Sourcepub fn with_parent(self, parent: NodeId) -> Self
pub fn with_parent(self, parent: NodeId) -> Self
Set the structural parent.
Sourcepub fn with_relation(self, relation: Relation) -> Self
pub fn with_relation(self, relation: Relation) -> Self
Add a relation.
Trait Implementations§
impl StructuralPartialEq for A11yNode
Auto Trait Implementations§
impl Freeze for A11yNode
impl RefUnwindSafe for A11yNode
impl Send for A11yNode
impl Sync for A11yNode
impl Unpin for A11yNode
impl UnsafeUnpin for A11yNode
impl UnwindSafe for A11yNode
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