simple_dot 0.1.1

Simple API for creating GraphViz DOT files.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use simple_dot::{
    attributes::{EdgeAttributes, LabelString, Styled},
    Edge, Identifier,
};

#[test]
fn test_simple_edges() {
    let a = Identifier::new_unchecked("a");
    let b = Identifier::new_unchecked("b");

    assert_eq!(
        Edge::new(a, b)
            .set_attributes(EdgeAttributes::default().label(LabelString::new_unchecked("a to b")))
            .to_string(),
        String::from("a -- b [ label = \"a to b\" ]\n")
    );
}