Function cedar_policy_core::transitive_closure::compute_tc

source ยท
pub fn compute_tc<K, V>(
    nodes: &mut HashMap<K, V>,
    enforce_dag: bool,
) -> Result<(), K>
where K: Clone + Eq + Hash + Debug + Display, V: TCNode<K>,
Expand description

Given Graph as a map from keys with type K to implementations of TCNode with type V, compute the transitive closure of the hierarchy. In case of error, the result contains an error structure Err<K> which contains the keys (with type K) for the nodes in the graph which caused the error. If enforce_dag then also check that the heirarchy is a DAG