Struct stybulate::Table [−][src]
pub struct Table<'a> { /* fields omitted */ }
Expand description
The Table structure
Example
use::stybulate::*;
let mut table = Table::new(
Style::Fancy,
vec![
vec![Cell::from("answer"), Cell::Int(42)],
vec![Cell::from("pi"), Cell::Float(3.1415)],
],
Some(Headers::from(vec!["strings", "numbers"]))
);
table.set_align(Align::Center, Align::Right);
Implementations
Table constructor with default alignments (Align::Left
for strings and Align::Decimal
for numbers)
Set the table alignments (defaults are Align::Left
for strings and Align::Decimal
for numbers)
Panics
Panics if str_align is equal to Align::Decimal