pub struct Frontmatter {
pub name: Option<String>,
pub description: Option<String>,
pub declarations: Vec<VarDecl>,
pub params: Vec<String>,
pub has_params: bool,
pub allow_unused: bool,
pub type_aliases: HashMap<String, VarType>,
pub imports: Vec<Import>,
pub consts: Vec<VarDecl>,
pub imported_consts: HashMap<String, Value>,
pub imported_enum_type_keys: Vec<String>,
}Expand description
Parsed YAML frontmatter from a .tmpl.md file.
Fields§
§name: Option<String>Template name (matches SKILL.md name: convention).
description: Option<String>Description of the template’s purpose.
declarations: Vec<VarDecl>List of expected variable declarations (name + type + optional default).
params: Vec<String>Convenience: parameter names only (derived from declarations).
has_params: boolWhether the params: block was present in frontmatter.
allow_unused: boolAllow declared parameters that are never referenced in the body.
Set via allow_unused: true in frontmatter. Useful for
dynamically-loaded templates where params may be conditionally used.
type_aliases: HashMap<String, VarType>Type aliases defined via types: in frontmatter.
Maps alias names (e.g. Priority) to their resolved VarType.
imports: Vec<Import>Import declarations defined via imports: in frontmatter.
consts: Vec<VarDecl>Constants defined via consts: in frontmatter.
imported_consts: HashMap<String, Value>Resolved constants from imports, keyed by stem.NAME.
imported_enum_type_keys: Vec<String>Keys in imported_consts that are enum type namespace dicts
(injected from imported enum type aliases). Used by the bare-enum-access
check to distinguish enum namespaces from struct constants.
Trait Implementations§
Source§impl Clone for Frontmatter
impl Clone for Frontmatter
Source§fn clone(&self) -> Frontmatter
fn clone(&self) -> Frontmatter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more