cargo_smith/templates/modular/
mod.rs1use crate::templates::Template;
2use anyhow::Result;
3use async_trait::async_trait;
4
5mod generate;
7mod feature;
8
9pub struct ModularTemplate;
10
11#[async_trait]
12impl Template for ModularTemplate {
13 fn name(&self) -> &str { "Modular" }
14
15 fn description(&self) -> &str {
16 "Modular Rust/Actix Web structure organized by features"
17 }
18
19 async fn generate(&self, project_name: &str) -> Result<()> {
21 generate::run(project_name).await
22 }
23
24 async fn add_feature(&self, feature_name: &str) -> Result<()> {
26 feature::run(feature_name).await
27 }
28}