Macro prettytable::table[][src]

macro_rules! table {
    ($([$($content:tt)*]), *) => { ... };
}

Create a table filled with some values

All the arguments used for elements must implement the std::string::ToString trait

Syntax

table!([Element1_ row1, Element2_ row1, ...], [Element1_row2, ...], ...);

Example

// Create a table initialized with some rows :
let tab = table!(["Element1", "Element2", "Element3"],
				 [1, 2, 3],
				 ["A", "B", "C"]
				 );

Some style can also be given in table creation

let tab = table!([FrByl->"Element1", Fgc->"Element2", "Element3"],
				 [FrBy => 1, 2, 3],
				 ["A", "B", "C"]
				 );

For details about style specifier syntax, check doc for Cell::style_spec method