Struct term_table::row::Row
[−]
[src]
pub struct Row<'data> {
pub cells: Vec<Cell<'data>>,
}A set of table cells
Fields
cells: Vec<Cell<'data>>
Methods
impl<'data> Row<'data>[src]
pub fn new<T>(cells: Vec<T>) -> Row<'data> where
T: Into<Cell<'data>>, [src]
T: Into<Cell<'data>>,
pub fn format(&self, max_widths: &Vec<usize>, style: &TableStyle) -> String[src]
Formats a row based on the provided table style
pub fn gen_separator(
&self,
max_widths: &Vec<usize>,
style: &TableStyle,
row_position: RowPosition,
previous_separator: Option<String>
) -> String[src]
&self,
max_widths: &Vec<usize>,
style: &TableStyle,
row_position: RowPosition,
previous_separator: Option<String>
) -> String
Generates the top separator for a row.
The previous seperator is used to determine junction characters
pub fn split_column_widths(&self) -> Vec<f32>[src]
Returns a vector of split cell widths.
A split width is the cell's total width divided by it's col_span value.
Each cell's split width value is pushed into the resulting vector col_span times.
pub fn num_columns(&self) -> usize[src]
Number of columns in the row.
This is the sum of all cell's col_span values