You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated with Grok Build: Grok 4.5 · xAI Imagine (/imagine)
src/graph.rs
pubstructNirGraph{pubnodes:IndexMap<String,NirNode>,// insertion orderpubedges:Vec<(String,String)>,// directed (src, dst)pubmetadata:HashMap<String,MetadataValue>,pubversion:Option<String>,// from /version on load}
API
Method
Behavior
new()
Empty graph
insert_node(name, node)
Fail on DuplicateNode
add_edge(from, to)
Append; no endpoint check until validate
get / get_mut
Lookup by name
len / is_empty
Node count
validate_structure()
Endpoints exist, no duplicate directed edges, nested graphs recurse
Cycles are allowed. Shape inference is out of scope.
Nested NirNode::Graph subgraphs re-validate; errors may be re-prefixed.