pub struct ParseOptions {
pub resolve_substitutions: bool,
pub origin_description: Option<String>,
/* private fields */
}Expand description
Options controlling the parse phase.
Construct via ParseOptions::defaults() and chain with_* methods.
The struct literal ParseOptions { .. } is not a valid invocation —
it would set resolve_substitutions: false, contradicting the Lightbend
default of true. Per E12 §“Options encoding per language”.
Fields§
§resolve_substitutions: boolWhether phase 2 (substitution resolution) runs immediately after parsing.
Default: true (Lightbend default — fused parse-and-resolve).
origin_description: Option<String>User-visible source name for error messages when no file path is available.
Default: None.
Implementations§
Source§impl ParseOptions
impl ParseOptions
Sourcepub fn defaults() -> Self
pub fn defaults() -> Self
Return ParseOptions with Lightbend-equivalent defaults:
resolve_substitutions = true, everything else None.
Sourcepub fn with_resolve_substitutions(self, b: bool) -> Self
pub fn with_resolve_substitutions(self, b: bool) -> Self
Return a copy with resolve_substitutions set to b.
Sourcepub fn with_origin_description(self, s: String) -> Self
pub fn with_origin_description(self, s: String) -> Self
Return a copy with origin_description set to s.
Sourcepub fn with_base_dir(self, p: PathBuf) -> Self
pub fn with_base_dir(self, p: PathBuf) -> Self
Return a copy with base_dir set to p.
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more