Skip to main content

render_to_vec

Function render_to_vec 

Source
pub fn render_to_vec(
    profiles: &[String],
    family: Option<&FamilyName>,
    config_override: Option<&Path>,
) -> Result<Vec<u8>, PrompterError>
Expand description

Render composed profiles to a byte vector.

Convenience wrapper around render_to_writer that handles config resolution and returns the rendered output as bytes. Intended for use by other crates that need prompt composition as a library.

§Arguments

  • profiles - Profile names to compose
  • family - Optional family used to substitute matching fragment variants
  • config_override - Optional path to custom config file

§Errors

Returns an error if config resolution, profile resolution, or rendering fails.