pub trait AccessKitProvider {
// Required methods
fn new_accessibility_node(
&mut self,
id: ElementId,
config: AccessibilityConfig<'_>,
);
fn get_action_requests(
&mut self,
id: ElementId,
) -> impl Iterator<Item = ActionRequest>;
fn set_tree_update_routine(&mut self, fun: Box<dyn Fn(TreeUpdate)>);
}Expand description
Bridge trait implemented by renderers or app shells for AccessKit integration.
Platform adapters implement this trait to connect Cotis element IDs to AccessKit’s tree and action-request APIs.
Required Methods§
Sourcefn new_accessibility_node(
&mut self,
id: ElementId,
config: AccessibilityConfig<'_>,
)
fn new_accessibility_node( &mut self, id: ElementId, config: AccessibilityConfig<'_>, )
Registers or updates the accessibility node for id.
Call when element metadata or bounds change (typically after layout).
Sourcefn get_action_requests(
&mut self,
id: ElementId,
) -> impl Iterator<Item = ActionRequest>
fn get_action_requests( &mut self, id: ElementId, ) -> impl Iterator<Item = ActionRequest>
Returns pending accessibility action requests for the given element.
§Note
The id parameter’s scoping intent is unspecified. AccessKit adapters
typically expose a global action-request queue; implementors should
document how id filters or relates to that queue.
Sourcefn set_tree_update_routine(&mut self, fun: Box<dyn Fn(TreeUpdate)>)
fn set_tree_update_routine(&mut self, fun: Box<dyn Fn(TreeUpdate)>)
Installs a callback invoked when the accessibility tree should be updated.
The platform adapter calls fun with TreeUpdate values to push
changes to the native accessibility layer.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".