Skip to main content

LockedCatalog

Struct LockedCatalog 

Source
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

Source

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.

Source

pub fn packages(&self) -> impl Iterator<Item = &LockedPackage>

Package rows in lock-file order, with load-local IDs.

Source

pub fn package(&self, id: LockedPackageId) -> Option<&LockedPackage>

The package of a valid row identity.

Source

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.

Source

pub const fn usage(&self) -> Usage

The byte, retained conversion and comparison work charged by this load.

Trait Implementations§

Source§

impl Debug for LockedCatalog

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for LockedCatalog

Source§

impl PartialEq for LockedCatalog

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Whether this borrowed key equals the stored key.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> EvidenceLease for T
where T: Debug + Send + Sync,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.