pub struct ScenarioFile {
pub version: u32,
pub scenario_name: Option<String>,
pub category: Option<String>,
pub description: Option<String>,
pub defaults: Option<Defaults>,
pub scenarios: Vec<Entry>,
}Expand description
A parsed v2 scenario file.
This is the top-level AST node produced by parse::parse. It captures
the exact structure of the YAML input without resolving defaults, expanding
packs, or compiling after-clauses.
§Catalog metadata
The three optional fields scenario_name,
category, and description
mirror the v1 top-level metadata shape so the CLI catalog probe
(sonda::scenarios::read_scenario_metadata) reads v1 and v2 files
through the same Deserialize struct. The compiler pipeline itself
(normalize → expand → compile_after → prepare) does not consume
these fields — they are pure metadata, not compile input.
Fields§
§version: u32Schema version. Must be 2.
scenario_name: Option<String>Catalog display name (kebab-case). When present it overrides the filename-derived name in the CLI catalog probe. Pure metadata — ignored by every compiler phase.
category: Option<String>Catalog category used by scenarios list --category <name> and
catalog list --category <name>. Allowed values are enforced by
the CLI CI validation (infrastructure, network, application,
observability); the AST itself does not constrain the string.
Pure metadata — ignored by every compiler phase.
description: Option<String>One-line human-readable description surfaced by
scenarios list / catalog list and scenarios show. Pure
metadata — ignored by every compiler phase.
defaults: Option<Defaults>Optional shared defaults inherited by all entries.
scenarios: Vec<Entry>One or more scenario entries (inline signals or pack references).
Trait Implementations§
Source§impl Clone for ScenarioFile
impl Clone for ScenarioFile
Source§fn clone(&self) -> ScenarioFile
fn clone(&self) -> ScenarioFile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more