Struct libtableformat::table::table_cell::TableCell [−][src]
A table cell represents a single grid rectangle within a table.
Cells belong to a row.
Implementations
impl TableCell[src]
pub fn empty() -> TableCell[src]
pub fn new(contents: Vec<Content>, base_style: ContentStyle) -> TableCell[src]
pub fn from_styled_content(format: &str, contents: Vec<&str>) -> TableCell[src]
pub fn from_data_item(
data_item: &DataItem,
base_style: ContentStyle
) -> TableCell[src]
data_item: &DataItem,
base_style: ContentStyle
) -> TableCell
Returns a TableCell from a DataItem.
Arguments
data_item- The data item from which to build the table cell.base_style- The base style to apply to the cell contents.
pub fn get_break_from_content(self: &TableCell) -> ColumnBreak[src]
Returns the column break specified in the first content line of the cell.
This is used to determine the column break for cells used in the table header row.
pub fn get_iterator(
self: &TableCell,
column_break: &ColumnBreak
) -> TableCellContentIterator<'_>ⓘNotable traits for TableCellContentIterator<'a>
impl<'a> Iterator for TableCellContentIterator<'a> type Item = String;[src]
self: &TableCell,
column_break: &ColumnBreak
) -> TableCellContentIterator<'_>ⓘ
Notable traits for TableCellContentIterator<'a>
impl<'a> Iterator for TableCellContentIterator<'a> type Item = String;Returns the next formatted line of content from this table cell.
Arguments
self- The table cell containing the line.width- The format width.
pub fn measure_height(self: &TableCell, column_break: &ColumnBreak) -> usize[src]
Measures the height needed for this cell when formatting its contents into a specific column width.
Arguments
self- The table cell being measured.column_width- The column width to measure against.
pub fn measure_width(self: &TableCell, column_break: &ColumnBreak) -> usize[src]
Measures the width of this cell.
Arguments
self- The table cell being measured.column_break- The column break for this cell.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TableCell
impl Send for TableCell
impl Sync for TableCell
impl Unpin for TableCell
impl UnwindSafe for TableCell
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>,