pub struct ResolvedChain {
pub key: String,
pub hops: Vec<PypiIndexUrl>,
pub implicit_public_fallback: bool,
}Expand description
One fully-resolved, ready-to-register routing chain — produced by
PypiIndexConfig::resolved_chains, consumed by
PypiRegistry::register_chain/register_named_source.
Fields§
§key: StringComposite identity — becomes both the router’s alternates map key and the
DependencySource::AlternateRegistry.index value for a plain (non-named-source)
dependency.
For a primary/extras chain (case a/b): an opaque, single-line hashed token produced by
deps_core::hash_routing_key ("pypi-chain") over the ordered hop strings plus the
Self::implicit_public_fallback flag — never a newline-joined or otherwise
URL-shaped value: deps-core’s AlternateRegistry.index doc describes this field as
“the resolved index URL” for Cargo/npm, and a value that merely looks like a URL
(but isn’t one) would violate that contract for any future reader — see plan.md’s N6
fix. An explicit chain [A, B] and an implicit chain that happens to resolve to the
same hops [A, B] plus the fallback flag produce different keys (this is what
closes the C2 aliasing defect: two files sharing a primary but differing extras never
collide, and editing a file’s extras changes its key on the next reparse).
For a named-source chain (Poetry source =/uv index =): the source’s own literal
URL, matching Cargo/npm’s convention for a single resolved index.
hops: Vec<PypiIndexUrl>Ordered, already-validated hops. Hop 0 becomes the registered client’s own
simple_base; the rest become its fallback_chain. Never empty — see
PypiIndexConfig::resolved_chains’s zero-hop handling.
implicit_public_fallback: booltrue only for a case-(b) chain (spec FR-005(b)) whose final hop is the implicit
public pypi.org root, appended at registration time rather than present in
Self::hops — PypiRegistry::register_chain builds that hop itself.
Trait Implementations§
Source§impl Clone for ResolvedChain
impl Clone for ResolvedChain
Source§fn clone(&self) -> ResolvedChain
fn clone(&self) -> ResolvedChain
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 ResolvedChain
impl RefUnwindSafe for ResolvedChain
impl Send for ResolvedChain
impl Sync for ResolvedChain
impl Unpin for ResolvedChain
impl UnsafeUnpin for ResolvedChain
impl UnwindSafe for ResolvedChain
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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