| Crates.io | capability-crate-writer |
| lib.rs | capability-crate-writer |
| version | 0.1.0 |
| created_at | 2025-07-13 21:49:03.31633+00 |
| updated_at | 2025-07-13 21:49:03.31633+00 |
| description | A Rust crate facilitating generation of Rust crate text for dynamic skill trees, supporting dispatch, aggregate, and leaf holder nodes with customizable descriptors. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1750842 |
| size | 229,408 |
Grower Skill Tree Crate Writer is a Rust crate that provides a flexible interface for generating skill trees in the form of Rust code. This facility is particularly useful for applications requiring hierarchical data structures, such as game development, simulations, and various modeling tasks.
This crate defines the SkillTreeCrateWriter trait, which allows the implementation of components capable of outputting Rust crate text that represents different node types: dispatch, aggregate, and leaf holder nodes.
Option types, and children probabilities are annotated for construction logic.The crate provides a simple error representation via the GrowerModelWriteSkillTreeError enum, facilitating straightforward error management within skill tree generation processes.
Here's a simple example demonstrating how to use the SkillTreeCrateWriter trait:
use capability_crate_writer::{SkillTreeCrateWriter, GrowerModel, GrowerModelWriteSkillTreeError};
impl SkillTreeCrateWriter for GrowerModel {
type Error = GrowerModelWriteSkillTreeError;
fn skill_tree_write_crate_text(&self) -> Result<String, Self::Error> {
// Implementation goes here.
}
}
Add the following to your Cargo.toml:
[dependencies]
capability-crate-writer = "0.1.0"
Contributions are welcome. Please follow the standard Rust guidelines for greater consistency and quality.
This project is licensed under the terms of the GPL-3.0 license.
This README.md file was generated by an AI model and may not be 100% accurate, however it should be pretty good.