pub trait E2eCodegen: Send + Sync {
// Required methods
fn generate(
&self,
groups: &[FixtureGroup],
e2e_config: &E2eConfig,
config: &ResolvedCrateConfig,
type_defs: &[TypeDef],
) -> Result<Vec<GeneratedFile>>;
fn language_name(&self) -> &'static str;
}Expand description
Trait for per-language e2e test code generation.
Required Methods§
Sourcefn generate(
&self,
groups: &[FixtureGroup],
e2e_config: &E2eConfig,
config: &ResolvedCrateConfig,
type_defs: &[TypeDef],
) -> Result<Vec<GeneratedFile>>
fn generate( &self, groups: &[FixtureGroup], e2e_config: &E2eConfig, config: &ResolvedCrateConfig, type_defs: &[TypeDef], ) -> Result<Vec<GeneratedFile>>
Generate all e2e test project files for this language.
type_defs is the IR type registry extracted from the source crate.
It is used by backends that need to introspect struct field types at
codegen time (e.g. the TypeScript/WASM generator uses it to
auto-derive nested_types mappings for wasm-bindgen class wrapping).
Sourcefn language_name(&self) -> &'static str
fn language_name(&self) -> &'static str
Language name for display and directory naming.