capability-skeleton-mock 0.1.0

A Rust crate for constructing and managing hierarchical skeleton structures with diverse node types, enabling advanced testing and simulation scenarios.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// ---------------- [ File: capability-skeleton-mock/src/three_level_chain.rs ]
crate::ix!();

/// Three-level chain => 0->1->2 => BFS => depth=3
pub fn three_level_chain() -> Skeleton {
    let n0 = make_dispatch_node(0, &[1]);
    let n1 = make_dispatch_node(1, &[2]);
    let n2 = make_leaf_node(2);
    SkeletonBuilder::default()
        .nodes(vec![n0, n1, n2])
        .root_id(Some(0))
        .build()
        .unwrap()
}