pub enum IndexTrust {
Trusted,
WorkspaceDeclared,
}Expand description
Whose input a candidate registry index URL is, for RegistryIndex::new’s
deps_core::net_policy::RegistryAccessPolicy gate.
A new enum rather than a reuse of Provenance, even though the variants map 1:1:
Provenance’s doc comment is an explicit “nothing ever branches on this” invariant
protecting the auth boundary; adding a policy branch on it would make that sentence false
and invite a future reader to add an auth branch too. Two small enums, one invariant
each.
Variants§
Trusted
$CARGO_HOME/config.toml or a CARGO_REGISTRIES_* environment variable — the
user’s own environment. Never policy-checked (see RegistryIndex::new).
WorkspaceDeclared
A workspace file: the Cargo.toml alias target itself, or any ancestor
.cargo/config.toml/[source] chain link within the workspace. Checked against the
live deps_core::net_policy::RegistryAccessPolicy.
Trait Implementations§
Source§impl Clone for IndexTrust
impl Clone for IndexTrust
Source§fn clone(&self) -> IndexTrust
fn clone(&self) -> IndexTrust
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for IndexTrust
Source§impl Debug for IndexTrust
impl Debug for IndexTrust
impl Eq for IndexTrust
Source§impl Hash for IndexTrust
impl Hash for IndexTrust
Source§impl PartialEq for IndexTrust
impl PartialEq for IndexTrust
Source§fn eq(&self, other: &IndexTrust) -> bool
fn eq(&self, other: &IndexTrust) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for IndexTrust
Auto Trait Implementations§
impl Freeze for IndexTrust
impl RefUnwindSafe for IndexTrust
impl Send for IndexTrust
impl Sync for IndexTrust
impl Unpin for IndexTrust
impl UnsafeUnpin for IndexTrust
impl UnwindSafe for IndexTrust
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.