#[non_exhaustive]pub struct TreeNode {
pub role: String,
pub name: Option<String>,
pub value: Option<String>,
pub children: Vec<TreeNode>,
}Expand description
A node in a recursive snapshot of the accessibility subtree.
Returned by Element::tree and [Locator::tree]. Each node carries the
role, display name, and value of one element, plus its children recursively.
children is empty when max_depth was reached or the element is a leaf.
#[non_exhaustive]: a dump node grows alongside ElementData — bounds
and stable ids are both plausible additions. Build one with
TreeNode::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.role: String§name: Option<String>§value: Option<String>§children: Vec<TreeNode>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TreeNode
impl<'de> Deserialize<'de> for TreeNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TreeNode
impl RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin for TreeNode
impl UnwindSafe for TreeNode
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