pub struct PlacedCell<'t> {
pub row: usize,
pub column: usize,
pub rowspan: usize,
pub colspan: usize,
pub align: ColumnAlign,
pub parts: Vec<&'t [Inline]>,
pub source: Option<(usize, usize)>,
}Expand description
A cell of Table::layout: where it stands in the grid, what it covers.
It borrows its text from the table, so a footnote in it can be kept for as
long as the table lives (the EPUB writer collects notes by reference).
Fields§
§row: usize§column: usize§rowspan: usizeAt least 1; never past the grid, never across the header boundary.
colspan: usize§align: ColumnAlignThe cell’s own alignment, or else its first column’s.
parts: Vec<&'t [Inline]>The text, in parts: the stored cell’s own content first (maybe empty),
then the content of each stored cell of its row that had no room (rule
3), non-empty ones only. The parts are one cell, one under the other,
a line break between them: PlacedCell::content joins them. Empty
for a cell the layout made up.
source: Option<(usize, usize)>(row, index in the row's list) of the stored cell; None for an
empty cell the layout made up for a position nothing covered.
Implementations§
Source§impl<'t> PlacedCell<'t>
impl<'t> PlacedCell<'t>
Sourcepub fn content(&self) -> Vec<Inline>
pub fn content(&self) -> Vec<Inline>
The cell’s text as one run of inlines, the parts joined by line
breaks (cloned; use parts to keep borrowing). A part that shows
nothing (the stored cell’s own, when it was empty) adds no line break.
Sourcepub fn shown_parts(&self) -> impl Iterator<Item = &'t [Inline]> + '_
pub fn shown_parts(&self) -> impl Iterator<Item = &'t [Inline]> + '_
The parts that show something (text or a footnote): what a writer joins with line breaks, so that none starts or ends the cell.