use dot_parser::canonical::Graph as CanonicalGraph; use dot_parser_macros::*; use petgraph::graph::Graph as PetGraph; fn main() { let petgraph: PetGraph<_, _> = CanonicalGraph::from(from_dot_string!("digraph { A -> B}")).into(); println!("{:#?}", petgraph); }