Crate papergrid[][src]

Expand description

Papergrid is a library for generating text-based tables for display


    use papergrid::{Grid, Entity, Settings};
    let mut grid = Grid::new(2, 2);
    grid.set(Entity::Cell(0, 0), Settings::new().text("0-0"));
    grid.set(Entity::Cell(0, 1), Settings::new().text("0-1"));
    grid.set(Entity::Cell(1, 0), Settings::new().text("1-0"));
    grid.set(Entity::Cell(1, 1), Settings::new().text("1-1"));

    let expected = concat!(

    assert_eq!(expected, grid.to_string());


Border structure represent all borders of a row

Grid provides a set of methods for building a text-based table

Settings represent setting of a particular cell


AlignmentHorizontal represents an horizontal aligment of a cell content.

AlignmentVertical represents an vertical aligment of a cell content.

Entity a structure which represent a set of cells.