Macro tabular::table[][src]

macro_rules! table {
    ($row_spec : expr, $($row : expr), *) => { ... };
    ($row_spec : expr, $($row : expr,) *) => { ... };
}
Expand description

A macro for building a Table.

table!(S, A, B, C) is equivalent to Table::new(S).with_row(A).with_row(B).with_row(B).

Examples

use tabular::{row, table};

let table = table!("{:>}  {:<}  {:<}",
                   row!(34, "hello", true),
                   row!(567, "goodbye", false));

assert_eq!( format!("\n{}", table),
            r#"
 34  hello    true
567  goodbye  false
"# );