pub struct PackageResource {
pub manifest: PackageManifest,
pub path: PathBuf,
pub package_toml_path: PathBuf,
pub layer_precedence: u32,
}Expand description
A discovered package resource with its manifest, filesystem path, and layer precedence.
The manifest metadata is available immediately. Resource composition is
performed on demand via compose.
Fields§
§manifest: PackageManifestThe parsed package manifest (metadata only).
path: PathBufAbsolute path to the package directory.
package_toml_path: PathBufPath to the package.toml file for reference.
layer_precedence: u32Precedence value of the discovery layer that produced this resource.
Implementations§
Source§impl PackageResource
impl PackageResource
Sourcepub fn compose(&self) -> Result<Vec<ComposedResource>, PackageDiscoveryError>
pub fn compose(&self) -> Result<Vec<ComposedResource>, PackageDiscoveryError>
Compose all resources from this package, applying filtering and security checks.
Scans the extensions/, skills/, fragments/, and themes/
subdirectories. When include lists are present in the manifest, only
listed resources are included and all must be found. Resources in the
disabled list are excluded. Resource paths are validated to stay
within the package directory.
Trait Implementations§
Source§impl Clone for PackageResource
impl Clone for PackageResource
Source§fn clone(&self) -> PackageResource
fn clone(&self) -> PackageResource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PackageResource
impl RefUnwindSafe for PackageResource
impl Send for PackageResource
impl Sync for PackageResource
impl Unpin for PackageResource
impl UnsafeUnpin for PackageResource
impl UnwindSafe for PackageResource
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
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>
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>
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