pub struct Skill {
pub manifest: SkillManifest,
pub path: PathBuf,
pub source: SkillSource,
}Expand description
A loaded skill with its manifest and path
Fields§
§manifest: SkillManifestSkill manifest
path: PathBufPath to the skill directory
source: SkillSourceSource/origin of the skill
Implementations§
Source§impl Skill
impl Skill
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Get the skill description
Sourcepub fn category(&self) -> &SkillCategory
pub fn category(&self) -> &SkillCategory
Get the skill category
Sourcepub fn source(&self) -> &SkillSource
pub fn source(&self) -> &SkillSource
Get the skill source
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Check if the skill is built-in
Sourcepub fn is_project_skill(&self) -> bool
pub fn is_project_skill(&self) -> bool
Check if the skill is from the project
Sourcepub fn has_pre_gen(&self) -> bool
pub fn has_pre_gen(&self) -> bool
Check if the skill has a pre_gen hook
Sourcepub fn has_post_gen(&self) -> bool
pub fn has_post_gen(&self) -> bool
Check if the skill has a post_gen hook
Sourcepub fn pre_gen_path(&self) -> Option<PathBuf>
pub fn pre_gen_path(&self) -> Option<PathBuf>
Get the pre_gen hook path
Sourcepub fn post_gen_path(&self) -> Option<PathBuf>
pub fn post_gen_path(&self) -> Option<PathBuf>
Get the post_gen hook path
Sourcepub fn load_prompt_template(&self) -> Result<Option<String>>
pub fn load_prompt_template(&self) -> Result<Option<String>>
Load a prompt template from the skill if available
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Skill
impl RefUnwindSafe for Skill
impl Send for Skill
impl Sync for Skill
impl Unpin for Skill
impl UnwindSafe for Skill
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.