Skip to main content

SopGraphExt

Trait SopGraphExt 

pub trait SopGraphExt {
    // Required methods
    fn from_sop(sop: &Sop) -> Self;
    fn from_sop_with_specs(sop: &Sop, specs: &ToolSpecs) -> Self;
    fn has_errors(&self) -> bool;
}
Expand description

Projection constructors for the shared SopGraph type. SopGraph lives in zeroclaw-sop-graph, so the build logic that needs the runtime’s Sop/ToolSpec hangs off this extension trait instead of an inherent impl. Call sites keep using SopGraph::from_sop(..) with the trait in scope.

Required Methods§

Source

fn from_sop(sop: &Sop) -> Self

Project a SOP into a graph. Never fails: unresolvable references (missing steps, dangling switch ports, unsatisfied required inputs) become diagnostics instead of errors, so editors can render and fix broken drafts.

Source

fn from_sop_with_specs(sop: &Sop, specs: &ToolSpecs) -> Self

Source

fn has_errors(&self) -> bool

True when any diagnostic is an error. Errors block validate_sop_strict.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§