[−][src]Struct term_table::row::Row
A set of table cells
Fields
cells: Vec<TableCell<'data>>has_separator: boolWhether the row should have a top boarder or not
Methods
impl<'data> Row<'data>[src]
pub fn new<I, T>(cells: I) -> Row<'data> where
T: Into<TableCell<'data>>,
I: IntoIterator<Item = T>, [src]
T: Into<TableCell<'data>>,
I: IntoIterator<Item = T>,
pub fn format(&self, column_widths: &[usize], style: &TableStyle) -> String[src]
Formats a row based on the provided table style
pub fn gen_separator(
&self,
column_widths: &[usize],
style: &TableStyle,
row_position: RowPosition,
previous_separator: Option<String>
) -> String[src]
&self,
column_widths: &[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, usize)>[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. Returns a vec of tuples containing the cell width and the min cell width
pub fn num_columns(&self) -> usize[src]
Number of columns in the row.
This is the sum of all cell's col_span values
Trait Implementations
Auto Trait Implementations
impl<'data> RefUnwindSafe for Row<'data>
impl<'data> Send for Row<'data>
impl<'data> Sync for Row<'data>
impl<'data> Unpin for Row<'data>
impl<'data> UnwindSafe for Row<'data>
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,
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> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
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.
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>,