MCPcopy Create free account
hub / github.com/argumentcomputer/ix / num_leaves

Method num_leaves

crates/kernel/src/shard.rs:281–286  ·  view source on GitHub ↗

Number of shard leaves under this node.

(&self)

Source from the content-addressed store, hash-verified

279impl AggNode {
280 /// Number of shard leaves under this node.
281 pub fn num_leaves(&self) -> usize {
282 match self {
283 AggNode::Leaf(_) => 1,
284 AggNode::Internal(l, r) => l.num_leaves() + r.num_leaves(),
285 }
286 }
287
288 /// Append every leaf's shard id (left-to-right).
289 pub fn collect_leaves(&self, out: &mut Vec<u32>) {

Callers 1

build_planFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected