Macro from_dot_string

Source
from_dot_string!() { /* proc-macro */ }
Expand description

Similar to from_dot_file!, but reads the DOT graph from a given literal instead of reading it from a file.

use dot_parser_macros::from_dot_string;
use dot_parser::canonical::Graph as CanonicalGraph;

let graph =
    CanonicalGraph::from(from_dot_string!("digraph { A -> B}"));
println!("{:#?}", graph);