pub trait Dot {
    fn dot_from_indices<F, W, S1, S2>(
        &self,
        writer: W,
        dot_options: S1,
        f: F
    ) -> Result<(), Error>
    where
        S1: AsRef<str>,
        S2: AsRef<str>,
        W: Write,
        F: FnMut(usize) -> S2
; fn dot_string_from_indices<F, S1, S2>(&self, dot_options: S1, f: F) -> String
    where
        S1: AsRef<str>,
        S2: AsRef<str>,
        F: FnMut(usize) -> S2
, { ... } fn dot_with_indices<S, W>(
        &self,
        writer: W,
        dot_options: S
    ) -> Result<(), Error>
    where
        S: AsRef<str>,
        W: Write
, { ... } fn dot_string_with_indices<S>(&self, dot_options: S) -> String
    where
        S: AsRef<str>
, { ... } fn dot<S, W>(&self, writer: W, dot_options: S) -> Result<(), Error>
    where
        S: AsRef<str>,
        W: Write
, { ... } fn dot_string<S>(&self, dot_options: S) -> String
    where
        S: AsRef<str>
, { ... } }
Expand description

Trait, which enables you to write a dot file

  • Dot files can be used to visualize a graph
  • To visualize, you can use something like
twopi dotfile.dot -Tpdf > dotfile.pdf
circo dotfile.dot -Tpdf > dotfile.pdf

You can also try some of the other roadmaps.

Required Methods

  • use function f to create labels depending on the index
  • for valid dot_options use dot_options! macro and take a look at module dot_constants

Provided Methods

  • same as self.dot_from_indices but returns String instead
  • use index as labels for the nodes
  • default implementation uses dot_from_indices
  • same as self.dot_with_indices but returns String instead
  • create dot file with empty labels
  • default implementation uses dot_from_indices
  • same as self.dot(), but returns a String instead

Implementors

You should use neato if you want the correct spacial placement of nodes

You should use neato if you want the correct spacial placement of nodes