pub struct GraphInfo { /* private fields */ }Expand description
Graph topology information for input resolution.
Maps each node to its predecessor node IDs so the executor knows where to read inputs from in the context store.
Implementations§
Source§impl GraphInfo
impl GraphInfo
Sourcepub fn new() -> Self
pub fn new() -> Self
An empty topology; every node resolves to no predecessors until
Self::set_predecessors says otherwise.
Sourcepub fn set_predecessors(
&mut self,
node_id: impl Into<String>,
preds: Vec<String>,
)
pub fn set_predecessors( &mut self, node_id: impl Into<String>, preds: Vec<String>, )
Register predecessors for a node.
Sourcepub fn from_graph(graph: &Graph) -> Self
pub fn from_graph(graph: &Graph) -> Self
Build GraphInfo from a somatize_core::graph::Graph.
Sourcepub fn for_linear(node_ids: &[&str]) -> Self
pub fn for_linear(node_ids: &[&str]) -> Self
Build GraphInfo for a linear pipeline (each node depends on the previous).
Sourcepub fn predecessors(&self, node_id: &str) -> &[String]
pub fn predecessors(&self, node_id: &str) -> &[String]
Get predecessors for a node.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphInfo
impl RefUnwindSafe for GraphInfo
impl Send for GraphInfo
impl Sync for GraphInfo
impl Unpin for GraphInfo
impl UnsafeUnpin for GraphInfo
impl UnwindSafe for GraphInfo
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