Method
add_node
(
&self,
f: &mut fmt::Formatter,
id: usize,
label: &str,
tooltip: Option<&str>,
)
Source from the content-addressed store, hash-verified
| 67 | } |
| 68 | |
| 69 | pub fn add_node( |
| 70 | &self, |
| 71 | f: &mut fmt::Formatter, |
| 72 | id: usize, |
| 73 | label: &str, |
| 74 | tooltip: Option<&str>, |
| 75 | ) -> fmt::Result { |
| 76 | if let Some(tooltip) = tooltip { |
| 77 | writeln!( |
| 78 | f, |
| 79 | " {}[shape=box label={}, tooltip={}]", |
| 80 | id, |
| 81 | GraphvizBuilder::quoted(label), |
| 82 | GraphvizBuilder::quoted(tooltip), |
| 83 | ) |
| 84 | } else { |
| 85 | writeln!( |
| 86 | f, |
| 87 | " {}[shape=box label={}]", |
| 88 | id, |
| 89 | GraphvizBuilder::quoted(label), |
| 90 | ) |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | pub fn add_edge( |
| 95 | &self, |
Tested by
no test coverage detected