pub struct DomElement {
pub ref_id: String,
pub tag: String,
pub role: Option<String>,
pub name: Option<String>,
pub text: Option<String>,
pub value: Option<String>,
pub enabled: bool,
pub visible: bool,
pub focusable: bool,
pub bounds: Option<ElementBounds>,
pub children: Vec<Self>,
pub attributes: BTreeMap<String, String>,
}Expand description
A single element in the accessible DOM tree with semantic metadata and ref handle.
Fields§
§ref_id: StringUnique ref handle for this element (e.g. “e3”), used to target interactions.
tag: StringHTML tag name (e.g. “div”, “button”).
role: Option<String>ARIA role if present (e.g. “button”, “navigation”).
name: Option<String>Accessible name derived from aria-label, text content, or other heuristics.
text: Option<String>Visible text content of the element.
value: Option<String>Form input value, if applicable.
enabled: boolWhether the element is interactive (not disabled).
visible: boolWhether the element is visible in the viewport.
focusable: boolWhether the element can receive keyboard focus.
bounds: Option<ElementBounds>Pixel-level bounding rectangle, if available.
children: Vec<Self>Nested child elements forming the accessible subtree.
attributes: BTreeMap<String, String>Raw HTML attributes on the element.
Trait Implementations§
Source§impl Clone for DomElement
impl Clone for DomElement
Source§fn clone(&self) -> DomElement
fn clone(&self) -> DomElement
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 DomElement
impl Debug for DomElement
Source§impl<'de> Deserialize<'de> for DomElement
impl<'de> Deserialize<'de> for DomElement
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
Source§impl PartialEq for DomElement
impl PartialEq for DomElement
Source§fn eq(&self, other: &DomElement) -> bool
fn eq(&self, other: &DomElement) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DomElement
impl Serialize for DomElement
impl StructuralPartialEq for DomElement
Auto Trait Implementations§
impl Freeze for DomElement
impl RefUnwindSafe for DomElement
impl Send for DomElement
impl Sync for DomElement
impl Unpin for DomElement
impl UnsafeUnpin for DomElement
impl UnwindSafe for DomElement
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