pub struct ElementData {Show 15 fields
pub role: Role,
pub name: Option<String>,
pub value: Option<String>,
pub description: Option<String>,
pub bounds: Option<Rect>,
pub actions: Vec<String>,
pub states: StateSet,
pub numeric_value: Option<f64>,
pub min_value: Option<f64>,
pub max_value: Option<f64>,
pub stable_id: Option<String>,
pub pid: Option<u32>,
pub attributes: HashMap<String, Value>,
pub raw: RawPlatformData,
pub handle: u64,
}Expand description
The raw data for a single element in an accessibility tree.
This is the underlying data struct. Most consumers should use Element,
which wraps ElementData with a provider reference for lazy navigation.
ElementData is used directly by provider implementors.
Fields§
§role: RoleElement role
name: Option<String>Human-readable name (title, label)
value: Option<String>Current value (text content, slider position, etc.)
description: Option<String>Supplementary description (tooltip, help text)
bounds: Option<Rect>Bounding rectangle in screen pixels
actions: Vec<String>Available actions reported by the platform.
Names are snake_case strings — well-known actions use their standard
names ("press", "toggle", "expand", etc.) and platform-specific
actions use their converted names (e.g. macOS AXCustomThing →
"custom_thing").
states: StateSetCurrent state flags
numeric_value: Option<f64>Numeric value for range controls (sliders, progress bars, spinners).
min_value: Option<f64>Minimum value for range controls.
max_value: Option<f64>Maximum value for range controls.
stable_id: Option<String>Platform-assigned stable identifier for cross-snapshot correlation.
- macOS:
AXIdentifier - Windows:
AutomationId - Linux: D-Bus
object_path
Not all elements have one.
pid: Option<u32>Process ID of the application that owns this element.
attributes: HashMap<String, Value>Full set of element attributes — both normalized properties and
platform-specific ones — keyed by snake_case names. Named properties
(name, value, enabled, etc.) also appear here.
raw: RawPlatformDataPlatform-specific raw data
handle: u64Opaque handle for the provider to look up the platform object. Not serialized — only valid within the provider that created it.
Implementations§
Source§impl ElementData
impl ElementData
Sourcepub fn populate_attributes(&mut self)
pub fn populate_attributes(&mut self)
Populate the attributes map from the struct’s named properties.
Providers should call this after constructing ElementData to ensure
normalized attributes are present in the map.
Trait Implementations§
Source§impl Clone for ElementData
impl Clone for ElementData
Source§fn clone(&self) -> ElementData
fn clone(&self) -> ElementData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more