pub fn topological_sort<T: Hash + Eq>(
graph: &HashMap<T, Vec<T>>,
) -> Result<HashMap<&T, i32>, Error>Expand description
Generates a topological ordering for a DAG. If a cycle is detected in any returns an error. This can operator on a disconnected graph containing multiple DAGs.