pub struct GoParseContext {
pub policy: Arc<RegistryAccessPolicy>,
pub config_cache: Arc<GoEnvCache>,
pub goenv_path: Option<PathBuf>,
}Expand description
Owned by GoEcosystem, shared across every document it parses.
Fields§
§policy: Arc<RegistryAccessPolicy>Gates every GOPROXY-declared GoProxyUrl this parse constructs.
config_cache: Arc<GoEnvCache>Memoizes $GOENV’s raw, unvalidated contents across every parse that reads it.
goenv_path: Option<PathBuf>The resolved $GOENV path to consult, if any — resolved once by the caller rather
than looked up internally, so nothing in this crate reads the live host environment
implicitly (spec 034 follow-up C3/C4, issue #559). Production callers
(crate::lib::register_ecosystems) pass goenv_path’s result; tests pass a fixture
path. None — the Default value — means “no $GOENV file”, the same hermetic,
zero-host-read behavior crate::parser::parse_go_mod’s doc already promises.
Trait Implementations§
Source§impl Clone for GoParseContext
impl Clone for GoParseContext
Source§fn clone(&self) -> GoParseContext
fn clone(&self) -> GoParseContext
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 moreSource§impl Debug for GoParseContext
impl Debug for GoParseContext
Source§impl Default for GoParseContext
impl Default for GoParseContext
Source§fn default() -> GoParseContext
fn default() -> GoParseContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GoParseContext
impl !UnwindSafe for GoParseContext
impl Freeze for GoParseContext
impl Send for GoParseContext
impl Sync for GoParseContext
impl Unpin for GoParseContext
impl UnsafeUnpin for GoParseContext
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