pub trait LanguageGenerator: Send {
// Required methods
fn generate_infrastructure<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn generate_scaffold<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn format_code<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
files: &'life2 [PathBuf],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn validate_code<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn print_next_steps(&self, context: &GenContext);
}Expand description
Interface for language-specific code generators
Required Methods§
Sourcefn generate_infrastructure<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_infrastructure<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate infrastructure code (e.g., protobuf types, actors)
Sourcefn generate_scaffold<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_scaffold<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<Vec<PathBuf>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generate user code scaffold
Sourcefn format_code<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
files: &'life2 [PathBuf],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn format_code<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
files: &'life2 [PathBuf],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Format generated code using language-specific tools
Sourcefn validate_code<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_code<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 GenContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate generated code (e.g., using a compiler)
Sourcefn print_next_steps(&self, context: &GenContext)
fn print_next_steps(&self, context: &GenContext)
Print next steps