Macro tabular::row [−][src]
macro_rules! row {
($($cell : expr), *) => { ... };
($($cell : expr,) *) => { ... };
}
Expand description
A macro for building a Row
.
row!(A, B, C)
is equivalent to
Row::new().with_cell(A).with_cell(B).with_cell(C)
.
Examples
use tabular::row;
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
"# );