pub struct DependencyGraph {
pub nodes: Vec<GraphNode>,
pub edges: Vec<GraphEdge>,
pub topo_order: Vec<String>,
}Expand description
The dependency graph, constructed once during build() and immutable thereafter.
Fields§
§nodes: Vec<GraphNode>All nodes indexed by record key.
edges: Vec<GraphEdge>All edges (both internal and external).
topo_order: Vec<String>Topological order of record keys (transforms come after their inputs).
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
Sourcepub fn build_and_validate(record_infos: &[RecordGraphInfo]) -> DbResult<Self>
pub fn build_and_validate(record_infos: &[RecordGraphInfo]) -> DbResult<Self>
Construct and validate the dependency graph from registered records.
This builds a complete DependencyGraph with nodes, edges, and topological order.
The graph is immutable after construction and can be used for introspection.
§Arguments
record_infos- Information about each registered record (origin, buffer, etc.)
§Returns
Ok(DependencyGraph)- The complete, validated graphErr(DbError::TransformInputNotFound)- If a transform references a missing recordErr(DbError::CyclicDependency)- If the transform edges form a cycle
Sourcepub fn topo_order(&self) -> &[String]
pub fn topo_order(&self) -> &[String]
Get the topological order
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Source§fn clone(&self) -> DependencyGraph
fn clone(&self) -> DependencyGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnsafeUnpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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