pub struct SkillManager { /* private fields */ }Expand description
从一个或多个目录发现 skills 的管理器。
发现规则:
skill_dir/SKILL.md存在时,skill_dir自身是一个 skill;skill_root/*/SKILL.md存在时,每个子目录是一个 skill;- skill id 使用目录名;
- skill name 与 description 来自
SKILL.md的 YAML frontmatter。
Implementations§
Source§impl SkillManager
impl SkillManager
pub fn discover_dir(path: impl AsRef<Path>) -> Result<Self, SkillError>
pub fn discover_dirs<I, P>(paths: I) -> Result<Self, SkillError>
pub fn list(&self) -> Vec<SkillIndexEntry>
pub fn read( &self, skill_id: &str, path: Option<&str>, ) -> Result<SkillReadResult, SkillError>
Trait Implementations§
Source§impl Debug for SkillManager
impl Debug for SkillManager
Source§impl Default for SkillManager
impl Default for SkillManager
Source§fn default() -> SkillManager
fn default() -> SkillManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SkillManager
impl RefUnwindSafe for SkillManager
impl Send for SkillManager
impl Sync for SkillManager
impl Unpin for SkillManager
impl UnsafeUnpin for SkillManager
impl UnwindSafe for SkillManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more