Trait Provider
pub trait Provider: Send + Sync {
// Required methods
fn get_app_tree(
&self,
target: &AppTarget,
opts: &QueryOptions,
) -> Result<Tree, Error>;
fn get_all_apps(&self, opts: &QueryOptions) -> Result<Tree, Error>;
fn perform_action(
&self,
tree: &Tree,
node: &Node,
action: Action,
data: Option<ActionData>,
) -> Result<(), Error>;
fn check_permissions(&self) -> Result<PermissionStatus, Error>;
fn list_apps(&self) -> Result<Vec<AppInfo>, Error>;
}Expand description
Platform backend trait for accessibility tree access.
Required Methods§
fn get_app_tree(
&self,
target: &AppTarget,
opts: &QueryOptions,
) -> Result<Tree, Error>
fn get_app_tree( &self, target: &AppTarget, opts: &QueryOptions, ) -> Result<Tree, Error>
Snapshot a specific application’s accessibility tree.
fn get_all_apps(&self, opts: &QueryOptions) -> Result<Tree, Error>
fn get_all_apps(&self, opts: &QueryOptions) -> Result<Tree, Error>
Snapshot all running applications (shallow).
fn perform_action(
&self,
tree: &Tree,
node: &Node,
action: Action,
data: Option<ActionData>,
) -> Result<(), Error>
fn perform_action( &self, tree: &Tree, node: &Node, action: Action, data: Option<ActionData>, ) -> Result<(), Error>
Perform an action on an element from a specific snapshot.
Ok(()) means the platform API accepted the request without error.
It does not guarantee the action had an observable effect — use
tree queries or Locator::wait_* methods to verify state changes.
fn check_permissions(&self) -> Result<PermissionStatus, Error>
fn check_permissions(&self) -> Result<PermissionStatus, Error>
Check if accessibility permissions are granted.