pub struct EmitConfig {
pub external_types: BTreeMap<String, String>,
pub bigint_behavior: BigIntBehavior,
pub case_default: Option<RenameAll>,
pub strict_unsupported: bool,
pub quote_style: QuoteStyle,
}Expand description
Per-build configuration for an crate::emit call.
The full surface is in place for PR 1, but later PRs wire the individual fields into the emission path:
external_typesis consumed by PR 3’s use-resolution + external-types lookupbigint_behavioris consumed by PR 1’semit_typeforu64/i64case_defaultis consumed by PR 2’s serde-rename enginestrict_unsupportedis documented but, per the OF-015 design pass, the emitter is hard-error only — the field exists today to keep theEmitConfigshape stable across the PR series, and the strict path is the only path the emitter takes regardless of the flag’s value. The field will be removed entirely in a later PR if no consumer surfaces a reason to keep it; see OF-015 scope item 6 for the rationale.
Fields§
§external_types: BTreeMap<String, String>Canonical-path → TS rendering map for types ontogen-ts treats as
terminal. Defaults shipped by PR 3 (chrono::DateTime → "string",
etc.); user overrides merge on top.
bigint_behavior: BigIntBehaviorRendering for 64-bit integer types. Defaults to
BigIntBehavior::Number.
case_default: Option<RenameAll>Default rename_all mode applied to types that don’t specify one.
None means “respect each type’s own annotation; emit fields as-is
otherwise.”
strict_unsupported: boolReserved for future use. Per the OF-015 design pass the emitter is hard-error only; this flag is currently a no-op and exists to keep the public shape stable across the PR series.
quote_style: QuoteStyleQuote style applied to every TS string literal the emitter renders.
Defaults to QuoteStyle::Single for byte-identical output with
pre-knob consumers.
Trait Implementations§
Source§impl Clone for EmitConfig
impl Clone for EmitConfig
Source§fn clone(&self) -> EmitConfig
fn clone(&self) -> EmitConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more