pub struct CargoParseContext {
pub policy: Arc<RegistryAccessPolicy>,
pub config_cache: Arc<ConfigFileCache>,
}Expand description
Carries the two pieces of process-wide state a Cargo parse needs beyond its own manifest content.
The live workspace-registry reachability policy (spec #443, registries.workspace_registries)
and the .cargo/config.toml memoization cache (spec NFR-005, plan-1b §1.5) — plumbed
together so crate::ecosystem::CargoEcosystem::with_context has one thing to hold and
pass through the sync parser (plan-1b §1.6), shared across every document this ecosystem
parses.
Fields§
§policy: Arc<RegistryAccessPolicy>Gates every IndexTrust::WorkspaceDeclared RegistryIndex this parse constructs.
config_cache: Arc<ConfigFileCache>Memoizes each distinct .cargo/config.toml/$CARGO_HOME/config.toml file’s raw,
unvalidated contents across every parse that reads it.
Trait Implementations§
Source§impl Clone for CargoParseContext
impl Clone for CargoParseContext
Source§fn clone(&self) -> CargoParseContext
fn clone(&self) -> CargoParseContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CargoParseContext
impl !UnwindSafe for CargoParseContext
impl Freeze for CargoParseContext
impl Send for CargoParseContext
impl Sync for CargoParseContext
impl Unpin for CargoParseContext
impl UnsafeUnpin for CargoParseContext
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
Mutably borrows from an owned value. Read more