pub trait SourceGenerator {
// Required method
fn generate(&self, tree: &ModuleTree) -> Result<GeneratedSource, ToSynError>;
}Expand description
Trait for source code generators.
Generators transform a ModuleTree into source code, supporting
different output strategies (single file, multi-file, etc.).
Required Methods§
Sourcefn generate(&self, tree: &ModuleTree) -> Result<GeneratedSource, ToSynError>
fn generate(&self, tree: &ModuleTree) -> Result<GeneratedSource, ToSynError>
Generate source code from a module tree.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".