| Crates.io | capability-grower-configuration |
| lib.rs | capability-grower-configuration |
| version | 0.1.0 |
| created_at | 2025-07-13 11:53:41.443905+00 |
| updated_at | 2025-07-13 11:53:41.443905+00 |
| description | A Rust crate to configure skill tree growth with capabilities for complexity management, tree expansion policies, capstone node handling, and error management. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1750394 |
| size | 432,624 |
The capability-grower-configuration crate provides a versatile system for configuring the growth and expansion policies of skill trees. This is particularly useful for applications involving hierarchical layouts of skills, abilities, or knowledge concepts. The crate essentially allows the user to describe how a skill tree ought to be expanded and sorted, featuring granular configurability options and error handling mechanisms.
CapstoneMode, which can be Off, Single, or Probabilistic.ConfigurationComplexity to handle simple to complex configurations.Simple, Weighted, DepthBased, AlwaysAggregate, and custom scripting support.SubBranchOrdering options.CapstoneMode: Determines how capstone nodes are handled, ranging from none to probabilistic modes.ConfigurationComplexity: Manages complexity versus usability, offering Simple, Balanced, and Complex variants.TreeExpansionPolicy: Indicates strategy for node type selection in tree growth.WeightedNodeVariantPolicy: Uses weights for random node variant selection.The crate provides structures for error handling, such as GrowerTreeConfigurationError for validating configurations. Errors include validation constraints like depth, breadth, or density violations.
The configuration allows for complex tree-structural settings, aiding in dynamic layout generation for various application domains. Utilize the builder pattern to craft configurations and leverage the rich suite of validation functions to ensure correctness.
use capability_grower_configuration::{GrowerTreeConfiguration, CapstoneMode};
let config = GrowerTreeConfiguration::base_config(3, 5, 2)
.with_level_specific(vec![3, 4, 5], vec![2, 2, 2])
.with_capstone(CapstoneMode::Single, 0.1);
// Validate and utilize configuration
match config.validate() {
Ok(_) => println!("Configuration is valid."),
Err(e) => println!("Configuration error: {:?}", e),
}
Note: This README.md was generated by an AI model and may not be 100% accurate, however, it should be pretty good.