pub struct SkillResource {
pub manifest: SkillManifest,
pub path: PathBuf,
pub skill_md_path: PathBuf,
pub layer_precedence: u32,
}Expand description
A discovered skill resource with its manifest, filesystem path, and layer precedence.
The manifest metadata is available immediately. The full skill body can be
loaded on demand via load_body.
Fields§
§manifest: SkillManifestThe parsed skill manifest (metadata only).
path: PathBufAbsolute path to the skill directory (containing SKILL.md).
skill_md_path: PathBufPath to the SKILL.md file itself, for on-demand body loading.
layer_precedence: u32Precedence value of the discovery layer that produced this resource.
Implementations§
Source§impl SkillResource
impl SkillResource
Sourcepub fn load_body(&self) -> Result<String, SkillDiscoveryError>
pub fn load_body(&self) -> Result<String, SkillDiscoveryError>
Load the full skill body (everything after the frontmatter) on demand.
This reads the SKILL.md file from disk, strips the frontmatter, and
returns the remaining content. This is the “progressive disclosure”
mechanism: metadata is always available, but the full instructions are
only loaded when the skill is actually invoked.
Trait Implementations§
Source§impl Clone for SkillResource
impl Clone for SkillResource
Source§fn clone(&self) -> SkillResource
fn clone(&self) -> SkillResource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SkillResource
impl RefUnwindSafe for SkillResource
impl Send for SkillResource
impl Sync for SkillResource
impl Unpin for SkillResource
impl UnsafeUnpin for SkillResource
impl UnwindSafe for SkillResource
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 more