#[non_exhaustive]pub struct Pack {
pub root: PathBuf,
pub manifest: Manifest,
pub body: Option<String>,
pub assets: Vec<Asset>,
pub verification_warnings: Vec<String>,
}Expand description
Loaded skill pack.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.root: PathBufPack root directory.
manifest: ManifestParsed manifest.
body: Option<String>Body loaded from SKILL.md on activation.
assets: Vec<Asset>Inert asset inventory.
verification_warnings: Vec<String>Non-fatal verification warnings observed while loading the pack.
Implementations§
Source§impl Pack
impl Pack
Sourcepub fn new(root: impl Into<PathBuf>, manifest: Manifest) -> Self
pub fn new(root: impl Into<PathBuf>, manifest: Manifest) -> Self
Create a pack from its root and manifest with no loaded body, assets, or warnings.
Sourcepub fn with_assets(self, assets: Vec<Asset>) -> Self
pub fn with_assets(self, assets: Vec<Asset>) -> Self
Attach collected inert assets.
Sourcepub fn with_verification_warnings(self, warnings: Vec<String>) -> Self
pub fn with_verification_warnings(self, warnings: Vec<String>) -> Self
Attach non-fatal verification warnings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pack
impl RefUnwindSafe for Pack
impl Send for Pack
impl Sync for Pack
impl Unpin for Pack
impl UnsafeUnpin for Pack
impl UnwindSafe for Pack
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