Function petgraph::algo::is_cyclic_directed  
source · [−]pub fn is_cyclic_directed<G>(g: G) -> bool where
    G: IntoNodeIdentifiers + IntoNeighbors + Visitable, Expand description
[Generic] Return true if the input directed graph contains a cycle.
This implementation is recursive; use toposort if an alternative is
needed.