#[non_exhaustive]pub struct ModuleRegistry {
pub local_modules: HashMap<Arc<Path>, EvaluatedComponent>,
pub external_refs: Vec<ExternalModuleRef>,
}Expand description
Map of local module dirs (canonical paths) to their evaluator output.
The graph phase looks up ModuleCall.source after canonicalising it
relative to the calling component’s dir; a hit drops the module’s
EvaluatedComponent into the expansion pipeline.
External (non-local) sources land in external_refs so the
modules.parquet writer (Phase 8) can still emit a row for them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.local_modules: HashMap<Arc<Path>, EvaluatedComponent>Canonical-path keyed map. The path is absolute and canonical so
..-laden sources from different call sites resolve to the same
entry.
external_refs: Vec<ExternalModuleRef>External / unwalked references, de-duplicated by source_raw.
Implementations§
Source§impl ModuleRegistry
impl ModuleRegistry
Sourcepub fn insert_local(
&mut self,
canonical: Arc<Path>,
component: EvaluatedComponent,
)
pub fn insert_local( &mut self, canonical: Arc<Path>, component: EvaluatedComponent, )
Insert a local module body keyed by its canonical absolute path. Idempotent — re-inserting the same path replaces the value (last writer wins; orchestrator guarantees uniqueness).
Sourcepub fn record_external(
&mut self,
source_raw: Arc<str>,
source: ModuleSource,
span: Span,
)
pub fn record_external( &mut self, source_raw: Arc<str>, source: ModuleSource, span: Span, )
Record an external reference if not already present (key:
source_raw).
Sourcepub fn get_local(&self, canonical: &Path) -> Option<&EvaluatedComponent>
pub fn get_local(&self, canonical: &Path) -> Option<&EvaluatedComponent>
Look up a local module body by canonical path.
Sourcepub fn local_count(&self) -> usize
pub fn local_count(&self) -> usize
Count of local modules in the registry.
Sourcepub fn external_count(&self) -> usize
pub fn external_count(&self) -> usize
Count of external references.
Trait Implementations§
Source§impl Clone for ModuleRegistry
impl Clone for ModuleRegistry
Source§fn clone(&self) -> ModuleRegistry
fn clone(&self) -> ModuleRegistry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more