Expand description
A Crate to output graphs on the Terminal
§Intended Use-Case
This is mostly intended to help in developing other Software that uses Graphs and needs a way to easily display them, either during Debugging or as Output to display to the User.
§Example
use termgraph::{DirectedGraph, IDFormatter, Config};
let config = Config::new(IDFormatter::new(), 3);
let mut graph = DirectedGraph::new();
graph.add_nodes([(0, "first"), (1, "second"), (2, "third")]);
graph.add_edges([(0, 1), (0,2), (1, 2)]);
termgraph::display(&graph, &config);
Structs§
- Config
- The Configuration to use for displaying a Graph
- Directed
Graph - A Directed Graph that can be displayed using
display
- IDFormatter
- Returns the ID for Formatting
- Line
Glyph Builder - This builder is used to construct a
LineGlyphs
instance - Line
Glyphs - Describes the Glyphs that should be used to display the lines in the Graph.
- Value
Formatter - Returns the Value for Formatting
Enums§
- Color
- The Colors that can be displayed in the console
Traits§
- Node
Format - Specifies how the Nodes of the Graph should be formatted