shapely-pretty
[!IMPORTANT]
There is no stable shapely API as of now (even though it's >1.0.0). The design is very much still being explored.
Expect multiple major versions in the near future — (note left 2025-03-11)
A pretty-printing library for types implementing the Shapely trait, providing colorful and well-formatted output.
Features
- Pretty-print any type implementing the
Shapelytrait - Colorful output with ANSI escape codes
- Unique colors for different scalar types based on their Shape hash
- Customizable indentation and formatting
- Dimmed colors for punctuation
- Simple abstraction over ANSI escape codes
Example
use Shapely;
use PrettyPrinter;
let person = Person ;
// Print with default settings
new.print;
// Customize the printer
new
.with_indent_size
.with_max_depth
.print;
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.