(
&self,
adapter_id: usize,
index_in_parent: i32,
child_count: i32,
window_focused: bool,
)
| 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()) |
no test coverage detected