pub struct GenerateOutput {
pub output_path: PathBuf,
pub warnings: Vec<String>,
pub role_count: usize,
pub bundled_theme_count: usize,
pub svg_count: usize,
pub total_svg_bytes: u64,
pub code: String,
/* private fields */
}Expand description
Output of a successful icon generation pipeline.
Contains the generated code, metadata about what was generated, and all
information needed to emit cargo directives. Call
emit_cargo_directives() to write the
output file and print cargo::rerun-if-changed / cargo::warning lines.
Fields§
§output_path: PathBufPath where the generated .rs file will be written.
warnings: Vec<String>Warnings collected during generation (e.g., orphan SVGs, unknown DE keys).
role_count: usizeNumber of icon roles in the generated enum.
bundled_theme_count: usizeNumber of bundled themes (themes with embedded SVGs).
svg_count: usizeTotal number of SVG files embedded.
total_svg_bytes: u64Total byte size of all embedded SVGs.
code: StringThe generated Rust source code.
Implementations§
Source§impl GenerateOutput
impl GenerateOutput
Sourcepub fn rerun_paths(&self) -> &[PathBuf]
pub fn rerun_paths(&self) -> &[PathBuf]
Return the paths that cargo should watch for changes.
Sourcepub fn emit_cargo_directives(&self)
pub fn emit_cargo_directives(&self)
Emit cargo directives, write the generated file, and print warnings.
This prints cargo::rerun-if-changed for all tracked paths, writes the
generated code to output_path, and prints warnings.
On I/O failure, emits a cargo::error= diagnostic and exits the process
with code 1 – matching the UnwrapOrExit error-handling pattern.
Trait Implementations§
Source§impl Clone for GenerateOutput
impl Clone for GenerateOutput
Source§fn clone(&self) -> GenerateOutput
fn clone(&self) -> GenerateOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GenerateOutput
impl Debug for GenerateOutput
Source§impl UnwrapOrExit<GenerateOutput> for Result<GenerateOutput, BuildErrors>
impl UnwrapOrExit<GenerateOutput> for Result<GenerateOutput, BuildErrors>
Source§fn unwrap_or_exit(self) -> GenerateOutput
fn unwrap_or_exit(self) -> GenerateOutput
Ok value or emit cargo errors and exit the process.