pub trait ResourceLoader {
// Required methods
fn get_extensions(&self) -> &LoadExtensionsResult;
fn get_skills(&self) -> (&[Skill], &[ResourceDiagnostic]);
fn get_prompts(&self) -> (&[PromptTemplate], &[ResourceDiagnostic]);
fn get_themes(&self) -> (&[LoadedTheme], &[ResourceDiagnostic]);
fn get_agents_files(&self) -> &[AgentsFile];
fn get_system_prompt(&self) -> Option<&str>;
fn get_append_system_prompt(&self) -> &[String];
fn extend_resources(&mut self, paths: ResourceExtensionPaths);
fn reload(
&mut self,
) -> impl Future<Output = Result<(), ResourceLoaderError>>;
}Expand description
Resource loading surface matching TypeScript ResourceLoader.
Required Methods§
Sourcefn get_extensions(&self) -> &LoadExtensionsResult
fn get_extensions(&self) -> &LoadExtensionsResult
Extension paths (Phase 3: no execution).
Sourcefn get_skills(&self) -> (&[Skill], &[ResourceDiagnostic])
fn get_skills(&self) -> (&[Skill], &[ResourceDiagnostic])
Skills + diagnostics.
Sourcefn get_prompts(&self) -> (&[PromptTemplate], &[ResourceDiagnostic])
fn get_prompts(&self) -> (&[PromptTemplate], &[ResourceDiagnostic])
Prompts + diagnostics.
Sourcefn get_themes(&self) -> (&[LoadedTheme], &[ResourceDiagnostic])
fn get_themes(&self) -> (&[LoadedTheme], &[ResourceDiagnostic])
Themes + diagnostics.
Sourcefn get_agents_files(&self) -> &[AgentsFile]
fn get_agents_files(&self) -> &[AgentsFile]
Context files.
Sourcefn get_system_prompt(&self) -> Option<&str>
fn get_system_prompt(&self) -> Option<&str>
Resolved system prompt text, if any.
Sourcefn get_append_system_prompt(&self) -> &[String]
fn get_append_system_prompt(&self) -> &[String]
Resolved append-system-prompt texts.
Sourcefn extend_resources(&mut self, paths: ResourceExtensionPaths)
fn extend_resources(&mut self, paths: ResourceExtensionPaths)
Extend skill/prompt/theme paths after load.
Sourcefn reload(&mut self) -> impl Future<Output = Result<(), ResourceLoaderError>>
fn reload(&mut self) -> impl Future<Output = Result<(), ResourceLoaderError>>
Reload settings, packages, and all resource snapshots.
§Errors
Returns ResourceLoaderError when package resolve fails or the
blocking resolve task panics.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".