pub struct ResourceTemplateData {
pub resource_type: String,
pub name: String,
pub install_path: String,
pub source: Option<String>,
pub version: Option<String>,
pub resolved_commit: Option<String>,
pub checksum: String,
pub path: String,
pub content: Option<String>,
}Expand description
Metadata about a resource for template context.
This struct represents the information available about a resource in the template context. It includes both the resource’s own metadata and its resolved installation information.
Fields§
§resource_type: StringResource type (agent, snippet, command, etc.)
name: StringLogical resource name from manifest
install_path: StringResolved installation path
source: Option<String>Source identifier (if applicable)
version: Option<String>Resolved version (if applicable)
resolved_commit: Option<String>Git commit SHA (if applicable)
checksum: StringSHA256 checksum of the content
path: StringSource-relative path in repository
content: Option<String>Processed content of the resource file.
Contains the file content with metadata stripped:
- For Markdown: Content without YAML frontmatter
- For JSON: Content without metadata fields
This field is available for all dependencies, enabling template
embedding via {{ agpm.deps.<type>.<name>.content }}.
Note: This field is large and should not be printed in debug output. Use the Debug impl which shows only the content length.
Trait Implementations§
Source§impl Clone for ResourceTemplateData
impl Clone for ResourceTemplateData
Source§fn clone(&self) -> ResourceTemplateData
fn clone(&self) -> ResourceTemplateData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more