MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / rebuild

Method rebuild

packages/server/src/devtools.rs:1596–1606  ·  view source on GitHub ↗
(&mut self, hierarchy: &Value)

Source from the content-addressed store, hash-verified

1594 }
1595
1596 fn rebuild(&mut self, hierarchy: &Value) {
1597 self.document_children.clear();
1598 self.nodes.clear();
1599 self.next_node_id = 2;
1600 if let Some(roots) = hierarchy.get("roots").and_then(Value::as_array) {
1601 for root in roots {
1602 let node_id = self.insert_node(root);
1603 self.document_children.push(node_id);
1604 }
1605 }
1606 }
1607
1608 fn insert_node(&mut self, node: &Value) -> u64 {
1609 let node_id = self.next_node_id;

Callers 1

refreshMethod · 0.80

Calls 3

insert_nodeMethod · 0.80
clearMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected