Macro dot_generator::id[][src]

macro_rules! id {
    () => { ... };
    (html $e : expr) => { ... };
    (esc $e : expr) => { ... };
    ($e : expr) => { ... };
}
Expand description

represents an id for node or subgraph in dot lang. #Example:

    fn id_test() {
        use dot_generator::*;
        use dot_structures::*;

        assert_eq!(id!(), Id::Anonymous("".to_string()));
        assert_eq!(id!(html "<<abc>>"), Id::Html("<<abc>>".to_string()));
        assert_eq!(id!("abc"), Id::Plain("abc".to_string()));
        assert_eq!(id!(esc "\"ab\\\"c\""), Id::Escaped("\"ab\\\"c\"".to_string()));
    }