Expand description
Serialize a Graph into a string according to the graphviz
DOT language.
§Example:
use dot_generator::*;
use dot_structures::*;
use graphviz_rust::printer::{PrinterContext,DotPrinter};
let mut ctx = PrinterContext::default();
let s = subgraph!("id"; node!("abc"), edge!(node_id!("a") => node_id!("b")));
assert_eq!(s.print(&mut ctx), "subgraph id {\n abc\n a -- b\n}".to_string());
Structs§
- Context allows to customize the output of the file.
Traits§
- The trait for serailizing a Graph into the
graphviz
DOT language:
Type Aliases§
- A function which can be passed to the PrinterContext to provide custom printing for attribute values.