Provider

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>

Snapshot a specific application’s accessibility tree.

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>

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>

Check if accessibility permissions are granted.

fn list_apps(&self) -> Result<Vec<AppInfo>, Error>

List running applications with their PIDs.

Trait Implementations§

§

impl ProviderExt for dyn Provider + '_

§

fn locator(&self, target: AppTarget, selector: &str) -> Locator<'_>

Create a Locator targeting a specific application.
§

fn locator_with_opts( &self, target: AppTarget, selector: &str, opts: QueryOptions, ) -> Locator<'_>

Create a Locator with custom query options.

Implementations on Foreign Types§

§

impl Provider for LinuxProvider

§

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>

Implementors§