Skip to main content

actr_cli/commands/initialize/
traits.rs

1use crate::{error::Result, template::ProjectTemplateName};
2use async_trait::async_trait;
3use std::path::PathBuf;
4
5/// Context for non-Rust project initialization.
6#[derive(Debug, Clone)]
7pub struct InitContext {
8    pub project_dir: PathBuf,
9    pub project_name: String,
10    pub signaling_url: String,
11    pub template: ProjectTemplateName,
12    pub is_current_dir: bool,
13}
14
15/// Interface for language-specific project initialization.
16#[async_trait]
17pub trait ProjectInitializer: Send + Sync {
18    async fn generate_project_structure(&self, context: &InitContext) -> Result<()>;
19    fn print_next_steps(&self, context: &InitContext);
20}