MCPcopy Create free account
hub / github.com/AccessKit/accesskit / cache_node

Method cache_node

platforms/atspi-common/src/node.rs:58–81  ·  view source on GitHub ↗
(
        &self,
        adapter_id: usize,
        index_in_parent: i32,
        child_count: i32,
        window_focused: bool,
    )

Source from the content-addressed store, hash-verified

56 }
57
58 pub(crate) fn cache_node(
59 &self,
60 adapter_id: usize,
61 index_in_parent: i32,
62 child_count: i32,
63 window_focused: bool,
64 ) -> CacheNode {
65 let parent = self
66 .0
67 .filtered_parent(&filter)
68 .map_or(NodeIdOrRoot::Root, |node| NodeIdOrRoot::Node(node.id()));
69 CacheNode {
70 adapter_id,
71 id: self.id(),
72 parent,
73 index_in_parent,
74 child_count,
75 interfaces: self.interfaces(),
76 name: self.name().unwrap_or_default(),
77 description: self.description().unwrap_or_default(),
78 role: self.role(),
79 states: self.state(window_focused),
80 }
81 }
82
83 fn filtered_child_ids(&self) -> impl DoubleEndedIterator<Item = NodeId> {
84 self.0.filtered_children(&filter).map(|child| child.id())

Callers 2

cache_item_for_nodeFunction · 0.80
collect_descendantsMethod · 0.80

Calls 15

filtered_parentMethod · 0.80
interfacesMethod · 0.80
adapter_indexMethod · 0.80
read_app_contextMethod · 0.80
filtered_childrenMethod · 0.80
focus_idMethod · 0.80
NodeWrapperClass · 0.70
NodeClass · 0.50
idMethod · 0.45
nameMethod · 0.45
descriptionMethod · 0.45

Tested by

no test coverage detected