inform gives you
- A
std::fmt::Formatterdrop-in replacement designed for formatting structured data such as AST nodes. - More generally, an API for formatting any type implementing
std::io::Writeorstd::fmt::Writewith indentation.
The format and IO implementations are behind Cargo features "fmt" and "io" respectively, both of which are enabled by default.
Contents
Examples
Here's how you can use fmt::IndentFormatter:
use ;
use IndentWriterCommon, IndentFormatter;
;
Here's how you can use fmt::IndentWriter:
use ;
use IndentWriterCommon, IndentWriter;
Projects using inform
Alternatives
The following crates are alternatives that I found did not fit my use case.
- https://crates.io/crates/indent
- https://crates.io/crates/indenter
- https://crates.io/crates/indentation
- https://docs.rs/indent_write/latest/indent_write/index.html
License
A copy of the LGPL License is provided in the LICENSE file.