1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! The emitter contract: turn an [`ExportModel`] into target files.
use crateResult;
use crate;
/// Transpiles an [`ExportModel`] into the files of a single deployment target.
///
/// Implementations live in their own modules: [`crate::ComposeEmitter`],
/// [`crate::KubernetesEmitter`], and [`crate::HelmEmitter`].
///
/// # Determinism requirement
///
/// Emitters must produce deterministic output. Container environment maps are
/// unordered, so any map-derived output must be sorted by key before it is
/// written - otherwise golden-file tests become flaky.
///
/// # Example
///
/// ```rust
/// use lightshuttle_export::{Emitter, ComposeEmitter, Target};
///
/// let emitter = ComposeEmitter;
/// assert_eq!(emitter.target(), Target::Compose);
/// ```