Struct term_table::table_cell::TableCell [−][src]
pub struct TableCell<'data> {
pub data: Cow<'data, str>,
pub col_span: usize,
pub alignment: Alignment,
pub pad_content: bool,
}Expand description
A table cell containing some str data.
A cell may span multiple columns by setting the value of col_span.
pad_content will add a space to either side of the cell’s content.AsRef
Fields
data: Cow<'data, str>col_span: usizealignment: Alignmentpad_content: boolImplementations
pub fn new_with_alignment<T>(
data: T,
col_span: usize,
alignment: Alignment
) -> TableCell<'data> where
T: ToString,
pub fn new_with_alignment_and_padding<T>(
data: T,
col_span: usize,
alignment: Alignment,
pad_content: bool
) -> TableCell<'data> where
T: ToString,
Calculates the width of the cell.
New line characters are taken into account during the calculation.
The width of the cell’s content divided by its col_span value.
Wraps the cell’s content to the provided width.
New line characters are taken into account.
Trait Implementations
Auto Trait Implementations
impl<'data> RefUnwindSafe for TableCell<'data>
impl<'data> UnwindSafe for TableCell<'data>
Blanket Implementations
Mutably borrows from an owned value. Read more