Crate papergrid[−][src]
Expand description
Papergrid is a library for generating text-based tables for display
Example
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!( "+---+---+\n", "|0-0|0-1|\n", "+---+---+\n", "|1-0|1-1|\n", "+---+---+\n", ); assert_eq!(expected, grid.to_string());
Structs
Border | Border structure represent all borders of a row |
Grid | Grid provides a set of methods for building a text-based table |
Settings | Settings represent setting of a particular cell |
Enums
AlignmentHorizontal | AlignmentHorizontal represents an horizontal aligment of a cell content. |
AlignmentVertical | AlignmentVertical represents an vertical aligment of a cell content. |
Entity | Entity a structure which represent a set of cells. |