Expand description
§Ramify
Ramify is a library for generating branch diagrams to visualize hierarchical data.
0 0 0
├╮ ├┬╮ ├┬╮
1├╮ │1├╮ │1│
│2│ ││2│ 2│╰─╮
│3│ │3││ │╰─╮│
├╮│ │╭╯│ ├┬╮││
4││ ││╭┼╮ │3│││
5│ │││4│ 4╭╯││
╭╯6 ││5╭╯ 5╭╯│
7 │6╭╯ 6╭╯
7╭╯ 7
8 This library is specifically designed for ordered data: this is closer to the output of
git log --graph --all than the output of tree. A prototypical application is to visualize the
undo-tree of a text file. The order is the timestamp of the edit, and the tree structure
results from the undo relation.
Getting started:
- To describe your hierarchical data, implement
RamifyorTryRamify. - To generate the branch diagram itself, use the
Generatorstruct. - To configure the diagram layout and appearance, use the
Configstruct or thebranch_writer!macro. Read more in thewritermodule.
§Usage examples
Usage examples can be found in the examples folder on GitHub.
Re-exports§
pub use self::writer::Config;
Modules§
- writer
- Configuration and styles for writing the branch diagram writer.
Macros§
- branch_
writer - A macro to generate a custom branch diagram style from a list of box-drawing characters.
Structs§
- Generator
- A generator which incrementally writes the branch diagram to a writer.
- Replacement
- A replacement vertex returned when a ramifier fails to determine the children associated with a vertex.
Enums§
- Write
Vertex Error - An error which can occur when calling
Generator::try_write_vertex.