Struct dot_writer::EdgeList[][src]

pub struct EdgeList<'d, 'w> { /* fields omitted */ }
Expand description

An EdgeList is returned from Scope::edge and can be used to set the attributes of an edge, or to chain additional nodes onto the edge statement.

Implementations

Adds another edge from the last node added to node_id. Note that nodes do not need to be already defined by Scope::node_auto or by Scope::node_named (unless you want to set node-specifc attributes).

use dot_writer::DotWriter;

let mut output_bytes = Vec::new();
{
  let mut writer = DotWriter::from(&mut output_bytes);
  writer.set_pretty_print(false);
  writer.digraph().edge("a", "b").edge("c").edge("d");
}
assert_eq!(
    std::str::from_utf8(&output_bytes).unwrap(),
    "digraph {a->b->c->d;}"
);

Start writing the attributes section of an edge definition. See the returned structure for what attributes can be set. Note that no more nodes can be added after this function is called.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.