| Crates.io | paligned |
| lib.rs | paligned |
| version | 0.1.0 |
| created_at | 2024-12-28 07:36:57.368294+00 |
| updated_at | 2024-12-28 07:36:57.368294+00 |
| description | A simple macro for aligned printing |
| homepage | |
| repository | https://github.com/varonroy/paligned |
| max_upload_size | |
| id | 1496908 |
| size | 8,271 |
Simple macro for aligned printing.
use paligned::paligned;
paligned! ([
["expression","value", "description"],
["1 + 1 =", 1 + 1],
["foo:", @debug foo, "`@debug` example"],
]);
// expression value description
// 1 + 1 = 2
// foo: Foo { val: 1 } `@debug` example
The goal of this crate is to provide a simple, zero-configuration solution for printing several rows with aligned columns. Basically, an alternative to:
println!("expression value description");
println!("1 + 1 = {}", 1 + 1);
println!("foo: {:?}", foo);
This macro is minimal on purpose, if you need fancier printing, then (at the cost of extra verbosity) I would recommend: