pub fn resolve_template(
template: &Template,
provider: &dyn TemplateProvider,
) -> BlueprintResult<Template>Expand description
Resolves a template’s inheritance chain into a fully merged template.
This function walks up the extends chain, merges styles from parent
to child, and returns a new template with all inherited fields resolved.
§Errors
BlueprintError::CircularInheritanceif a cycle is detectedBlueprintError::TemplateNotFoundif a parent template is missingBlueprintError::InheritanceDepthExceededif depth exceeds limit
§Example
ⓘ
let templates = HashMap::from([
("base".into(), base_template),
("child".into(), child_template),
]);
let resolved = resolve_template(&child_template, &templates)?;
assert!(resolved.meta.extends.is_none()); // No extends after resolution