Struct libtableformat::table::Table [−][src]
Implementations
impl Table[src]
pub fn empty() -> Table[src]
pub fn new(
border: Border,
column_breaks: Vec<ColumnBreak>,
column_headers: TableRow,
row_headers: Vec<TableCell>,
data_rows: Vec<TableRow>
) -> Table[src]
border: Border,
column_breaks: Vec<ColumnBreak>,
column_headers: TableRow,
row_headers: Vec<TableCell>,
data_rows: Vec<TableRow>
) -> Table
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.
pub fn from_vec(
column_headers: TableRow,
cell_styles: Vec<ContentStyle>,
data: Vec<&str>
) -> Table[src]
column_headers: TableRow,
cell_styles: Vec<ContentStyle>,
data: Vec<&str>
) -> Table
Returns a table built from a string vector data source.
Arguments
column_headers- The header row describes how to split the data.cell_styles- The base styles to apply to each cell.data- A vector containing the data for the table body.
pub fn from_data_source<'a, I>(
column_headers: TableRow,
cell_styles: Vec<ContentStyle>,
row_headers: Vec<TableCell>,
data_source: I
) -> Table where
I: Iterator<Item = &'a DataItem>, [src]
column_headers: TableRow,
cell_styles: Vec<ContentStyle>,
row_headers: Vec<TableCell>,
data_source: I
) -> Table where
I: Iterator<Item = &'a DataItem>,
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.
pub fn format(self: &Table) -> String[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,