Struct libtableformat::table::Table [−][src]
pub struct Table { pub border: Border, // some fields omitted }
Fields
border: Border
Implementations
impl Table
[src]
impl Table
[src]#[must_use]pub fn new(
border: Border,
column_breaks: Vec<CellWidth>,
column_headers: Row,
row_headers: Vec<Cell>,
data_rows: Vec<Row>
) -> Table
[src]
#[must_use]pub fn new(
border: Border,
column_breaks: Vec<CellWidth>,
column_headers: Row,
row_headers: Vec<Cell>,
data_rows: Vec<Row>
) -> Table
[src]Returns a table from the supplied parameters.
Arguments
border
- Describes the table border.column_breaks
- Column breaks describe header row widths.column_headers
- The content for the column headers.row_headers
- The content for the row headers.data_rows
- The rows in the table body.
#[must_use]pub fn from_vec(
column_headers: Row,
cell_styles: &[ContentStyle],
data: &[&str]
) -> Table
[src]
#[must_use]pub fn from_vec(
column_headers: Row,
cell_styles: &[ContentStyle],
data: &[&str]
) -> Table
[src]pub fn from_data_source<'a, I>(
column_headers: Row,
cell_styles: &[ContentStyle],
row_headers: Vec<Cell>,
data_source: I
) -> Table where
I: Iterator<Item = &'a DataItem>,
[src]
pub fn from_data_source<'a, I>(
column_headers: Row,
cell_styles: &[ContentStyle],
row_headers: Vec<Cell>,
data_source: I
) -> Table where
I: Iterator<Item = &'a DataItem>,
[src]Returns a table built from a data source.
Arguments
column_headers
- The header row describes how to split the data.cell_styles
- The base styles to apply to each cell.row_headers
- The row headers to put before each row.data_source
- An iterable source providing the table body data.