pub enum WorkspaceRegistryAccess {
Off,
PublicOnly,
All,
}Expand description
The user-facing policy governing whether a workspace-declared registry index is ever fetched at all.
Applied only to workspace-provenance URLs (a Cargo.toml/.cargo/config.toml value
found inside the opened workspace) — a $CARGO_HOME-provenance index is the user’s own
trusted configuration and is never policy-checked, under any variant here.
Variants§
Off
Block every workspace-declared index — the only complete boundary. Also blocks the
registry/registry-index alias path, not only [source] replace-with.
PublicOnly
Allow only HostClass::Global hosts — blocks the observed attack shape (an IP
literal in a metadata/RFC1918 range) while leaving a corporate https://index.mycorp.dev
working, since a DNS name cannot be classified without resolving it (the residual risk
this variant’s name is honest about — see the module docs).
All
Allow every class — today’s pre-hardening behavior, the escape hatch for a workspace that legitimately points at an RFC1918/loopback registry.
Implementations§
Trait Implementations§
Source§impl Clone for WorkspaceRegistryAccess
impl Clone for WorkspaceRegistryAccess
Source§fn clone(&self) -> WorkspaceRegistryAccess
fn clone(&self) -> WorkspaceRegistryAccess
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 WorkspaceRegistryAccess
Source§impl Debug for WorkspaceRegistryAccess
impl Debug for WorkspaceRegistryAccess
Source§impl Default for WorkspaceRegistryAccess
impl Default for WorkspaceRegistryAccess
Source§fn default() -> WorkspaceRegistryAccess
fn default() -> WorkspaceRegistryAccess
impl Eq for WorkspaceRegistryAccess
Source§impl Hash for WorkspaceRegistryAccess
impl Hash for WorkspaceRegistryAccess
Source§impl PartialEq for WorkspaceRegistryAccess
impl PartialEq for WorkspaceRegistryAccess
Source§fn eq(&self, other: &WorkspaceRegistryAccess) -> bool
fn eq(&self, other: &WorkspaceRegistryAccess) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorkspaceRegistryAccess
Auto Trait Implementations§
impl Freeze for WorkspaceRegistryAccess
impl RefUnwindSafe for WorkspaceRegistryAccess
impl Send for WorkspaceRegistryAccess
impl Sync for WorkspaceRegistryAccess
impl Unpin for WorkspaceRegistryAccess
impl UnsafeUnpin for WorkspaceRegistryAccess
impl UnwindSafe for WorkspaceRegistryAccess
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.