facet-pretty
facet-pretty adds a .pretty() method to any type that derives Facet,
producing a colored, human-readable representation. Think {:#?} debug output,
but without needing derive(Debug) and with richer structure.
rust
use facet:: Facet ;
use facet_pretty:: FacetPretty ;
# [ derive ( Facet )]
struct Person {
name : String ,
age : u32 ,
}
let person = Person { name : "Alice" . to_string (), age : 30 };
println! ( "{}" , person. pretty ()); Produces:
text
Person {
name: "Alice",
age: 30,
}Sponsors
Thanks to all individual sponsors:
...along with corporate sponsors:
...without whom this work could not exist.
Special thanks
The facet logo was drawn by Misiasart.
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.