tabled 0.9.0

An easy to use library for pretty print tables of Rust `struct`s and `enum`s.
//! The example can be run by this command
//! `cargo run --example formatting_settings`

use tabled::{
    formatting::{AlignmentStrategy, TrimStrategy},
    object::Segment,
    Alignment, Modify, Style, TableIteratorExt,
};

fn main() {
    let some_json = r#"
[
    "foo",
    {
        "bar": 1,
        "baz": [
            2,
            3
        ]
    }
]"#;

    let mut table = [some_json].table();
    table
        .with(Style::rounded())
        .with(Modify::new(Segment::all()).with(Alignment::center()));

    println!("A default Alignment settings\n{}", table);

    table.with(Modify::new(Segment::all()).with(AlignmentStrategy::PerLine));

    println!("Per line Alignment strategy\n{}", table);

    table.with(
        Modify::new(Segment::all())
            .with(AlignmentStrategy::PerCell)
            .with(TrimStrategy::Both),
    );

    println!(
        "A default Alignment; allowing vertical and horizontal trim\n{}",
        table
    );
}