| Crates.io | capability-skeleton-mock |
| lib.rs | capability-skeleton-mock |
| version | 0.1.0 |
| created_at | 2025-07-13 22:34:55.258694+00 |
| updated_at | 2025-07-13 22:34:55.258694+00 |
| description | A Rust crate for constructing and managing hierarchical skeleton structures with diverse node types, enabling advanced testing and simulation scenarios. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1750891 |
| size | 196,084 |
The capability-skeleton-mock crate provides an advanced mock-up framework for constructing complex hierarchical structures, or skeletons, with different node types. Primarily designed for testing and simulation, it facilitates the creation and management of tree-like data models with configurable node attributes.
Below is an example of creating a structured skeleton with dispatch and leaf nodes, demonstrating the crate's core functionality:
use capability_skeleton_mock::{make_dispatch_node, make_leaf_node, SkeletonBuilder};
fn main() {
let n0 = make_dispatch_node(0, &[1, 2]);
let n1 = make_leaf_node(1);
let n2 = make_leaf_node(2);
let skeleton = SkeletonBuilder::default()
.nodes(vec![n0, n1, n2])
.root_id(Some(0))
.build()
.unwrap();
// Use skeleton in simulations...
}
This crate employs advanced traversal techniques and depth management to facilitate stress-testing of hierarchical data. It supports BFS logic, enabling robust navigation and manipulation of branches and leaves.
Contributions, bug reports, and feature requests are welcome. Please feel free to open issues or submit pull requests.
This project is licensed under the GPL-3.0 License.
This README.md was generated by an AI model and may not be 100% accurate; however, it should be pretty good.