Skip to main content

run_render_stdout

Function run_render_stdout 

Source
pub fn run_render_stdout(
    profiles: &[String],
    separator: Option<&str>,
    pre_prompt: Option<&str>,
    post_prompt: Option<&str>,
    config_override: Option<&Path>,
    json: bool,
) -> Result<(), String>
Expand description

Render one or more profiles to stdout.

Convenience function that reads configuration and renders the specified profiles to standard output with optional separator, pre-prompt, and post-prompt. When multiple profiles are provided, files are deduplicated across all profiles.

§Arguments

  • profiles - Profile names to render (deduplicated in order)
  • separator - Optional separator between files
  • pre_prompt - Optional custom pre-prompt text
  • post_prompt - Optional custom post-prompt text
  • config_override - Optional configuration file override
  • json - Whether to output in JSON format

§Returns

  • Ok(()) - Profiles rendered successfully
  • Err(String) - Rendering failed

§Errors

Returns an error if:

  • Configuration file cannot be read or parsed
  • Profile resolution fails
  • Writing to stdout fails