| Crates.io | capability-skeleton |
| lib.rs | capability-skeleton |
| version | 0.1.0 |
| created_at | 2025-07-13 12:00:11.320143+00 |
| updated_at | 2025-07-13 12:00:11.320143+00 |
| description | A Rust library for managing and building complex hierarchical tree structures such as skill trees. Supports serialization, error handling, and deep tree metrics. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1750421 |
| size | 273,850 |
capability-skeleton is a Rust library designed to manage hierarchical data structures, particularly those that mimic skill trees or directed graphs. Its architecture allows for the flexible creation and manipulation of these trees with built-in safety and serialization features.
Integrate the crate into your project by including it in your Cargo.toml dependency list:
[dependencies]
capability-skeleton = "0.1.0"
Here's a simple example demonstrating how to build and utilize a skill tree:
use capability_skeleton::{Skeleton, SkeletonNodeBuilder, NodeKind};
let mut builder = SkeletonNodeBuilder::default();
let node = builder.id(1).name("RootNode").build(NodeKind::Aggregate).unwrap();
// Initialize the Skeleton
let mut tree = Skeleton::default();
tree.nodes_mut().push(node);
// Add more nodes...
For comprehensive examples, refer to the documentation.
Node Variants:
Level Map Construction: Use BFS to determine node levels for visualization or metrics.
Tree Analysis Metrics: Including balance symmetry, depth, density, leaf granularity, and more.
This README was generated by an AI model and may not be 100% accurate, but it should be pretty good.