pub struct Cell {
pub content: String,
pub col_span: Option<usize>,
pub h_align: Option<HAlign>,
pub v_align: Option<VAlign>,
pub blank_char: Option<char>,
}
Expand description
Data type that represents options for a cell and its content.
Fields§
§content: String
The content of the cell. It can be a multi line string or even a nested Grid
.
col_span: Option<usize>
Number of columns that this cell will be spreads out into.
If None
specified, the value col_span
of the grid will
be used. If col_span
of the grid also is None
, value 1
will be used.
§Panics
Panics if 0
is specified.
h_align: Option<HAlign>
Align content of the cell horizontally. If None
specified,
the value h_align
of the grid will be used. If h_align
of the grid also is None
, HAlign::Left
will be used.
v_align: Option<VAlign>
Align content of the cell vertically. If None
specified,
the value v_align
of the grid will be used. If v_align
of the grid also is None
, VAlign::Top
will be used.
blank_char: Option<char>
Fill cell padding spaces by this char value. If None
specified,
the value blank_char
of the grid will be used. If blank_char
of the grid also is None
, white space char ('\x20'
) will be used.
Implementations§
Source§impl Cell
impl Cell
Sourcepub fn builder(content: String, col_span: usize) -> CellBuilder
pub fn builder(content: String, col_span: usize) -> CellBuilder
Creates a CellBuilder
initiated with content
and col_span
properties.
To build the final CellBuilder
call the build
method.