pub struct SkillsManager { /* private fields */ }Expand description
Skills manager - handles discovery and loading of skills
Implementations§
Source§impl SkillsManager
impl SkillsManager
Sourcepub fn has_project_skills(&self) -> bool
pub fn has_project_skills(&self) -> bool
Check if project skills are available
Sourcepub fn project_skills_path(&self) -> Option<&Path>
pub fn project_skills_path(&self) -> Option<&Path>
Get the project skills directory
Sourcepub fn ensure_skills_dir(&self) -> Result<()>
pub fn ensure_skills_dir(&self) -> Result<()>
Ensure the skills directory exists
Sourcepub fn discover(&mut self) -> Result<&mut Self>
pub fn discover(&mut self) -> Result<&mut Self>
Discover and load all skills (user + project) Project skills take precedence over user skills with the same name
Sourcepub fn by_category(&self, category: &SkillCategory) -> Vec<&Skill>
pub fn by_category(&self, category: &SkillCategory) -> Vec<&Skill>
Get skills by category
Sourcepub fn create_skill(
&self,
name: &str,
category: SkillCategory,
) -> Result<PathBuf>
pub fn create_skill( &self, name: &str, category: SkillCategory, ) -> Result<PathBuf>
Create a new skill from a template
Sourcepub fn remove_skill(&mut self, name: &str) -> Result<()>
pub fn remove_skill(&mut self, name: &str) -> Result<()>
Remove a skill (only user skills can be removed)
Sourcepub fn skills_dir(&self) -> &Path
pub fn skills_dir(&self) -> &Path
Get the user skills directory path
Sourcepub fn ensure_project_skills_dir(&self) -> Result<Option<PathBuf>>
pub fn ensure_project_skills_dir(&self) -> Result<Option<PathBuf>>
Get or create the project skills directory
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SkillsManager
impl RefUnwindSafe for SkillsManager
impl Send for SkillsManager
impl Sync for SkillsManager
impl Unpin for SkillsManager
impl UnwindSafe for SkillsManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.