Skip to main content

Module loader

Module loader 

Source
Expand description

Purpose: Provide the public template-loading API surface for built-in and custom task templates.

Responsibilities:

  • Declare the template::loader child modules.
  • Re-export the stable public API used by CLI surfaces and callers.

Scope:

  • Thin facade only; implementation lives in sibling files under template/loader/.

Usage:

  • Import public template-loading helpers through crate::template or crate::template::loader.

Invariants/Assumptions:

  • The public API surface remains stable across the split.
  • Custom-template precedence, validation, and substitution behavior remain unchanged.

Structs§

LoadedTemplate
Result of loading a template with context.
TemplateInfo
Metadata for a template (used for listing).

Enums§

TemplateError
Error type for template operations.
TemplateSource
Source of a loaded template.

Functions§

get_template_context
Get the template context for inspection.
list_templates
List all available templates (built-in + custom).
load_template
Load a template by name.
load_template_with_context
Load a template by name with variable substitution.
load_template_with_context_legacy
Load a template by name with variable substitution (legacy, non-strict).
template_exists
Check if a template exists (either custom or built-in).