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:

GitHub Sponsors Patreon

...along with corporate sponsors:

AWS Zed Depot

...without whom this work could not exist.

Special thanks

The facet logo was drawn by Misiasart.

License

Licensed under either of:

at your option.