Skip to main content

GraphBuilder

Trait GraphBuilder 

Source
pub trait GraphBuilder:
    Send
    + Sync
    + Debug {
    // Required method
    fn build(
        &self,
        components: Vec<EvaluatedComponent>,
        registry: &ModuleRegistry,
        ctx: &GraphContext,
    ) -> Result<Workspace>;
}
Expand description

Trait the orchestrator calls to build a Workspace. Phase 5 ships exactly one implementation, DefaultGraphBuilder; downstream tests may swap an in-memory variant.

Required Methods§

Source

fn build( &self, components: Vec<EvaluatedComponent>, registry: &ModuleRegistry, ctx: &GraphContext, ) -> Result<Workspace>

Flatten every module call into its caller and produce a Workspace.

§Errors

Returns crate::Error only on fatal IR-construction failures (currently: an crate::ir::Address collision after expansion). Non-fatal anomalies — unresolvable module sources, depth-cap breaches, cycles — surface as Workspace::diagnostics.

Implementors§