pub trait SkillLibrary: Send + Sync {
// Required methods
fn relevant(&self, ctx: &str, limit: usize) -> Vec<Skill>;
fn add(&self, skill: Skill) -> Result<()>;
fn all(&self) -> Vec<Skill>;
fn curate(&self) -> Result<()>;
fn prune(&self, min_score: f64) -> Result<usize>;
fn get(&self, name: &str) -> Option<Skill>;
fn invoke(&self, name: &str) -> Result<Option<SkillInvocation>>;
fn remove(&self, name: &str) -> Result<bool>;
// Provided method
fn skills_root(&self) -> Option<PathBuf> { ... }
}Required Methods§
fn relevant(&self, ctx: &str, limit: usize) -> Vec<Skill>
fn add(&self, skill: Skill) -> Result<()>
fn all(&self) -> Vec<Skill>
fn curate(&self) -> Result<()>
fn prune(&self, min_score: f64) -> Result<usize>
fn get(&self, name: &str) -> Option<Skill>
fn invoke(&self, name: &str) -> Result<Option<SkillInvocation>>
Provided Methods§
Sourcefn skills_root(&self) -> Option<PathBuf>
fn skills_root(&self) -> Option<PathBuf>
On-disk root for the library, if any. In-memory implementations
return None; sparrow skills update reads SKILL.md from here.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".