Skip to main content

load_from_str

Function load_from_str 

Source
pub fn load_from_str(
    content: &str,
    source_name: &str,
) -> Result<PipelineConfig, ConfigError>
Expand description

Load a PipelineConfig from a TOML string.

Useful for testing or embedding configs without file I/O.

§Arguments

  • content — TOML content as a string.
  • source_name — Identifier for the source (used in error messages).

§Returns

  • Ok(PipelineConfig) if the TOML is well-formed and valid.
  • Err(ConfigError::Parse) if the TOML is malformed.
  • Err(ConfigError::Validation) if semantic constraints are violated.

§Panics

This function never panics.