pub struct LockedCatalog { /* private fields */ }Expand description
A strict Cargo.lock version 3 or 4 package/edge profile.
TOML, repository IRIs, reference percent escapes, checksums and retained storage
use PurRDF. Cargo versions use the private borrowed version adapter. Source
repository spellings remain lexical identities, not guessed URL equivalences.
Abbreviated edges must select exactly one complete package. Replacements and
unsupported fields refuse instead of publishing partial dependency evidence.
A catalog proves locked relationships, not source contents or active features.
Native retained conversion uses the original item allowance. Version parsing allocates nothing, and matching spends the original work grant before scanning qualifiers. The TOML decoder’s temporary internal allocations have no admission callback; the original file/total-byte bounds apply to its input.
Implementations§
Source§impl LockedCatalog
impl LockedCatalog
Sourcepub fn load(
tree: &dyn Tree,
path: &RelPath,
options: &LoadOptions,
) -> Result<Self, LoadError>
pub fn load( tree: &dyn Tree, path: &RelPath, options: &LoadOptions, ) -> Result<Self, LoadError>
Read and validate all package rows and outgoing references under bounds.
§Errors
Returns the original tree, byte, native storage or work refusal, or an actionable lock-profile error for malformed, unsupported, duplicate, missing or ambiguous evidence. No first-match edge is accepted.
Sourcepub fn packages(&self) -> impl Iterator<Item = &LockedPackage>
pub fn packages(&self) -> impl Iterator<Item = &LockedPackage>
Package rows in lock-file order, with load-local IDs.
Sourcepub fn package(&self, id: LockedPackageId) -> Option<&LockedPackage>
pub fn package(&self, id: LockedPackageId) -> Option<&LockedPackage>
The package of a valid row identity.
Sourcepub fn select_dependency(
&self,
owner: LockedPackageId,
declaration: &DependencyDeclaration,
registry: Option<RegistryIndex<'_>>,
options: &LoadOptions,
) -> Result<LockedPackageId, LoadError>
pub fn select_dependency( &self, owner: LockedPackageId, declaration: &DependencyDeclaration, registry: Option<RegistryIndex<'_>>, options: &LoadOptions, ) -> Result<LockedPackageId, LoadError>
Select one owning row’s outgoing dependency by its written declaration.
Uses the package rename, version and declared source/reference constraints. Registry declarations need explicit matching configuration unless their index is written directly. A path declaration retains its owner’s local or exact Git-workspace source; selection does not prove that row corresponds to the declared directory. Optional features and target conditions are not evaluated. Selection alone neither binds a source tree nor establishes a loaded package’s identity.
§Errors
Refuses unknown owners, malformed declarations/configuration, missing or ambiguous outgoing matches, incompatible constraints and budget failures. Query storage shares the original retained catalog’s item allowance; work bounds this selection’s comparisons, including compared text lengths.
Trait Implementations§
Source§impl Debug for LockedCatalog
impl Debug for LockedCatalog
impl Eq for LockedCatalog
Auto Trait Implementations§
impl Forget for LockedCatalog
impl Freeze for LockedCatalog
impl Move for LockedCatalog
impl RefUnwindSafe for LockedCatalog
impl Send for LockedCatalog
impl Sync for LockedCatalog
impl Unpin for LockedCatalog
impl UnsafeUnpin for LockedCatalog
impl UnwindSafe for LockedCatalog
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> EvidenceLease for 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