capability_skeleton_mock/
single_node_skeleton.rs

1// ---------------- [ File: capability-skeleton-mock/src/single_node_skeleton.rs ]
2crate::ix!();
3
4/// A single node skeleton with `leaf_count`.
5pub fn single_node_skeleton(leaf_count: u16) -> Skeleton {
6    let node0 = SkeletonNodeBuilder::default()
7        .id(0)
8        .name("SingleNode")
9        .original_key("SingleNode")
10        .leaf_count(leaf_count)
11        .build(NodeKind::LeafHolder)
12        .unwrap();
13    SkeletonBuilder::default()
14        .nodes(vec![node0])
15        .root_id(Some(0))
16        .build()
17        .unwrap()
18}