quercus 0.1.0

Easy to use CLI tree for your branchy info.
Documentation
  • Coverage
  • 0%
    0 out of 20 items documented0 out of 15 items with examples
  • Size
  • Source code size: 83.31 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.64 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • jevgarrido/quercus
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jevgarrido

quercus

quercus is the scientific genus name for oak trees.

This crate was inspired by ptree.

Main features

This crate allows you to create trees with many roots.

This crate does not have a syntax distinction for the first node/branch of a given root. This makes it easy to create a tree recursively, as the order information is not needed when adding a new branch.

Usage

The code:

    let mut tree = Tree::new();

    tree.node("Root");

    tree.begin_branches();
        tree.node("Branch 1");
        tree.node("Branch 2");
    tree.end_branches();

    tree.prune();
    
    println!("{tree}");

results in the following output:

For a node with many lines use the node_many_lines() command.

Examples

For an example that uses the colored crate as well as the node_many_lines() command, run

$ cargo run --release --example hierarchy

This should yield the following output:

For an example that builds a tree recursively, run

$ cargo run --release --example fibonacci

This should yield the following output:

License

This project is licensed under either