Returns the number of leaf nodes in the tree.
(&self)
| 45 | |
| 46 | /// Returns the number of leaf nodes in the tree. |
| 47 | pub fn leaf_count(&self) -> usize { |
| 48 | self.leaf_count_recursive(&self.root) |
| 49 | } |
| 50 | |
| 51 | /// Recursively count leaf nodes with proper arena access. |
| 52 | fn leaf_count_recursive(&self, node: &NodeRef<K, V>) -> usize { |