Skip to main content

Emitter

Trait Emitter 

Source
pub trait Emitter {
    // Required methods
    fn target(&self) -> Target;
    fn emit(&self, model: &ExportModel) -> Result<ExportArtifacts>;
}
Expand description

Transpiles an ExportModel into the files of a single target.

Implementations live in their own modules (compose, kubernetes, helm). Emitters must produce deterministic output: container environment maps are unordered, so any map-derived output has to be sorted by key before it is written, otherwise golden-file tests turn flaky.

Required Methods§

Source

fn target(&self) -> Target

The target this emitter produces.

Source

fn emit(&self, model: &ExportModel) -> Result<ExportArtifacts>

Emit the target files for model.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§