Skip to main content

SkillLoader

Trait SkillLoader 

Source
pub trait SkillLoader:
    Send
    + Sync
    + 'static {
    // Required methods
    fn list(
        &self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SkillMeta>, SdkError>> + Send + '_>>;
    fn load(
        &self,
        name: &str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Skill>, SdkError>> + Send + '_>>;
}
Expand description

Discover and load skill files (SKILL.md) from a directory tree.

Required Methods§

Source

fn list( &self, ) -> Pin<Box<dyn Future<Output = Result<Vec<SkillMeta>, SdkError>> + Send + '_>>

Scan the loader’s configured roots and return all discovered skills.

Source

fn load( &self, name: &str, ) -> Pin<Box<dyn Future<Output = Result<Option<Skill>, SdkError>> + Send + '_>>

Load a single skill by name.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§