MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / children_for_node

Method children_for_node

packages/server/src/devtools.rs:1687–1704  ·  view source on GitHub ↗
(&self, node_id: u64, depth: i64)

Source from the content-addressed store, hash-verified

1685 }
1686
1687 fn children_for_node(&self, node_id: u64, depth: i64) -> Vec<Value> {
1688 if node_id == 1 {
1689 return self
1690 .document_children
1691 .iter()
1692 .map(|child_id| self.node_value(*child_id, depth))
1693 .collect();
1694 }
1695 self.nodes
1696 .get(&node_id)
1697 .map(|node| {
1698 node.children
1699 .iter()
1700 .map(|child_id| self.node_value(*child_id, depth))
1701 .collect()
1702 })
1703 .unwrap_or_default()
1704 }
1705
1706 fn node_value(&self, node_id: u64, depth: i64) -> Value {
1707 let Some(node) = self.nodes.get(&node_id) else {

Callers

nothing calls this directly

Calls 2

node_valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected