[][src]Macro tabular::row

macro_rules! row {
    ( $( $cell:expr ),* ) => { ... };
    ( $( $cell:expr, )* ) => { ... };
}

A macro for building a Row.

row!(A, B, C) is equivalent to Row::new().with_cell(A).with_cell(B).with_cell(B).

Examples

#[macro_use(row)]
extern crate tabular;

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

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