pub struct ReferenceObservation { /* private fields */ }Expand description
A read-only reference package whose manifest matches its selected lock identity.
Local and registry contents are observations of the supplied contained Tree, not archive authentication. Git contents require the sealed committed backend. The loaded workspace deliberately retains no locked bindings, configured dependency edges or preferred-provider admission.
Implementations§
Source§impl ReferenceObservation
impl ReferenceObservation
Sourcepub fn local_root(
catalog: &LockedCatalog,
tree: &dyn Tree,
manifest: &RelPath,
options: &LoadOptions,
) -> Result<Self, LoadError>
pub fn local_root( catalog: &LockedCatalog, tree: &dyn Tree, manifest: &RelPath, options: &LoadOptions, ) -> Result<Self, LoadError>
Observe one actual local root package and associate its explicit or inherited version with a unique source-less lock row. This is the owning manifest context for subsequent declaration-qualified reference requests.
§Errors
Refuses missing/ambiguous lock identity, invalid inheritance and bounded source failures. No provider admission is retained.
Sourcepub fn load(
request: &ReferenceRequest<'_>,
tree: &dyn Tree,
manifest: &RelPath,
options: &LoadOptions,
) -> Result<Self, LoadError>
pub fn load( request: &ReferenceRequest<'_>, tree: &dyn Tree, manifest: &RelPath, options: &LoadOptions, ) -> Result<Self, LoadError>
Observe a local or registry package through the ordinary bounded source loader. The manifest is relative to the supplied Tree, whose root must retain any workspace manifest needed for inherited package fields.
§Errors
Refuses unresolved declarations, Git rows, mismatched manifests, extra packages, invalid inheritance and all ordinary source/containment limits.
Sourcepub fn committed(
request: &ReferenceRequest<'_>,
tree: &CommittedGitTree<'_>,
manifest: &RelPath,
options: &LoadOptions,
) -> Result<Self, LoadError>
pub fn committed( request: &ReferenceRequest<'_>, tree: &CommittedGitTree<'_>, manifest: &RelPath, options: &LoadOptions, ) -> Result<Self, LoadError>
Observe the exact committed source selected by the declaration and lock row.
The returned workspace usage includes the protocol, listing and blob work of this observation under its original selection/source allowance. The caller’s prior construction of the supplied Tree precedes this operation.
§Errors
Refuses a different committed source and all bounded source/identity failures.
Sourcepub const fn workspace(&self) -> &Workspace
pub const fn workspace(&self) -> &Workspace
Parsed source and declarations, without provider-admitted locked bindings.
Sourcepub const fn package(&self) -> PackageId
pub const fn package(&self) -> PackageId
The selected package within this observation’s own workspace.
Sourcepub const fn row(&self) -> LockedPackageId
pub const fn row(&self) -> LockedPackageId
Selected identity within the request’s catalog.
Sourcepub const fn source(&self) -> Option<&LockedSource>
pub const fn source(&self) -> Option<&LockedSource>
Complete external lock source, absent for a local path package.
Auto Trait Implementations§
impl !Freeze for ReferenceObservation
impl Forget for ReferenceObservation
impl Move for ReferenceObservation
impl RefUnwindSafe for ReferenceObservation
impl Send for ReferenceObservation
impl Sync for ReferenceObservation
impl Unpin for ReferenceObservation
impl UnsafeUnpin for ReferenceObservation
impl UnwindSafe for ReferenceObservation
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> 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