Expand description
Types that hold source information for a group of packages.
The primary type youβre looking for is PackageRegistry. It is an
abstraction over multiple Sources. PackageRegistry also implements
the Registry trait, allowing a dependency resolver to query necessary
package metadata (i.e., Summary) from it.
Not to be confused with crate::sources::registry and crate::ops::registry.
The former is just one kind of source,
while the latter involves operations on the registry Web API.
Re-exportsΒ§
use cargo_util::collections::HashMap;πuse cargo_util::collections::HashSet;πuse std::cell::RefCell;πuse crate::sources::IndexSummary;πuse crate::sources::config::SourceConfigMap;πuse crate::sources::source::QueryKind;πuse crate::sources::source::Source;πuse crate::sources::source::SourceMap;πuse crate::util::VersionReqMatchMode;πuse crate::util::errors::CargoResult;πuse crate::util::interning::InternedString;πuse crate::util::CanonicalUrl;πuse crate::util::GlobalContext;πuse crate::workspace::Dependency;πuse crate::workspace::PackageId;πuse crate::workspace::PackageSet;πuse crate::workspace::Patch;πuse crate::workspace::SourceId;πuse crate::workspace::Summary;πuse anyhow::Context as _;πuse cargo_util_terminal::report::Level;πuse futures::stream::FuturesUnordered;πuse itertools::Itertools;πuse tracing::debug;πuse tracing::trace;πuse url::Url;π
StructsΒ§
- Locked
Patch Dependency - Argument to
PackageRegistry::patchwhich is information about a[patch]directive that we found in a lockfile, if present. - Package
Registry - This structure represents a registry of known packages. It internally
contains a number of
Sourceinstances which are used to load aPackagefrom.
EnumsΒ§
- Kind π
- Kinds of sources a
PackageRegistryhas loaded.
TraitsΒ§
- Registry
- An abstraction provides a set of methods for querying source information about a group of packages, without leaking too much implementation details of the actual registry.
FunctionsΒ§
- lock π
- See
PackageRegistry::lock. - summary_
for_ πpatch - A helper for selecting the summary, or generating a helpful error message.
Type AliasesΒ§
- Locked
Map π - A map of all βlocked packagesβ which is filled in when parsing a lock file and is used to guide dependency resolution by altering summaries as theyβre queried from this source.
- Patch
Dependency - This tuple is an argument to
PackageRegistry::patch.