use super::KvasirError;
use super::graph::KvasirGraph;
pub struct ExecutionPlanner<'a> {
graph: &'a KvasirGraph,
}
impl<'a> ExecutionPlanner<'a> {
pub fn new(graph: &'a KvasirGraph) -> Self {
Self { graph }
}
pub fn compile(&self) -> Result<Vec<super::graph::NodeKey>, KvasirError> {
let order = self.graph.topological_sort()?;
Ok(order)
}
}