facet-pretty 0.44.4

Pretty-printing for Facet types with syntax highlighting and customizable formatting
Documentation
1
2
3
4
5
6
7
8
use facet_pretty::FacetPretty;

fn main() {
    let mut file = std::fs::File::open("/dev/urandom").expect("Failed to open /dev/urandom");
    let mut bytes = vec![0u8; 128];
    std::io::Read::read_exact(&mut file, &mut bytes).expect("Failed to read from /dev/urandom");
    println!("{}", bytes.pretty());
}