9 releases (5 breaking)

Uses new Rust 2024

new 0.6.2 Mar 22, 2025
0.6.1 Feb 23, 2025
0.6.0 Jan 30, 2025
0.5.0 Sep 29, 2024
0.1.0 Aug 28, 2024

#64 in Rendering engine

Download history 11/week @ 2024-12-09 1/week @ 2024-12-16 2/week @ 2025-01-06 2/week @ 2025-01-13 132/week @ 2025-01-27 33/week @ 2025-02-03 24/week @ 2025-02-10 108/week @ 2025-02-17 111/week @ 2025-02-24 40/week @ 2025-03-03 4/week @ 2025-03-10 83/week @ 2025-03-17

302 downloads per month
Used in ports

MIT/Apache

42KB
993 lines

very nice table

Crates.io License GitHub Tag crates.io GitHub Actions Workflow Status

Number one table.

Very basic and lightweight table builder to print tabular data.

Example

use std::fmt::Alignment::{Left, Right};
use verynicetable::Table;

fn main() {
    let ports = vec![
        vec!["rapportd", "449", "Quentin", "*:61165"],
        vec!["Python", "22396", "Quentin", "*:8000"],
        vec!["foo", "108", "root", "*:1337"],
        vec!["rustrover", "30928", "Quentin", "127.0.0.1:63342"],
        vec!["Transmiss", "94671", "Quentin", "*:51413"],
        vec!["Transmiss", "94671", "Quentin", "*:51413"],
    ];

    let table = Table::new()
        .headers(&["COMMAND", "PID", "USER", "HOST:PORT"])
        .alignments(&[Left, Right, Left, Right])
        .data(&ports)
        .max_rows(5)
        .to_string();

    print!("{table}");
}
COMMAND      PID  USER           HOST:PORT
rapportd     449  Quentin          *:61165
Python     22396  Quentin           *:8000
...          ...  ...                  ...
rustrover  30928  Quentin  127.0.0.1:63342
Transmiss  94671  Quentin          *:51413
Transmiss  94671  Quentin          *:51413

That's about it.

No runtime deps