Macro prettytable::cell

source ·
macro_rules! cell {
    () => { ... };
    ($value:expr) => { ... };
    ($style:ident -> $value:expr) => { ... };
}
Expand description

This macro simplifies Cell creation

Support 2 syntax : With and without style specification.

Syntax

cell!(value);

or

cell!(spec->value);

Value must implement the std::string::ToString trait

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

Example

let cell = cell!("value");
// Do something with the cell
// Create a cell with style (Red foreground, Bold, aligned to left);
let styled = cell!(Frbl->"value");