pub trait ResolvableCell {
// Required methods
fn resolve_cell<'a>(
self,
x: usize,
y: usize,
fill: &Option<Paint>,
align: Smart<Alignment>,
inset: Sides<Option<Rel<Length>>>,
stroke: Sides<Option<Option<Arc<Stroke<Abs>>>>>,
breakable: bool,
locator: Locator<'a>,
styles: StyleChain<'_>,
) -> Cell<'a>;
fn x(&self, styles: StyleChain<'_>) -> Smart<usize>;
fn y(&self, styles: StyleChain<'_>) -> Smart<usize>;
fn colspan(&self, styles: StyleChain<'_>) -> NonZeroUsize;
fn rowspan(&self, styles: StyleChain<'_>) -> NonZeroUsize;
fn span(&self) -> Span;
}
Expand description
Used for cell-like elements which are aware of their final properties in the table, and may have property overrides.
Required Methods§
Sourcefn resolve_cell<'a>(
self,
x: usize,
y: usize,
fill: &Option<Paint>,
align: Smart<Alignment>,
inset: Sides<Option<Rel<Length>>>,
stroke: Sides<Option<Option<Arc<Stroke<Abs>>>>>,
breakable: bool,
locator: Locator<'a>,
styles: StyleChain<'_>,
) -> Cell<'a>
fn resolve_cell<'a>( self, x: usize, y: usize, fill: &Option<Paint>, align: Smart<Alignment>, inset: Sides<Option<Rel<Length>>>, stroke: Sides<Option<Option<Arc<Stroke<Abs>>>>>, breakable: bool, locator: Locator<'a>, styles: StyleChain<'_>, ) -> Cell<'a>
Resolves the cell’s fields, given its coordinates and default grid-wide
fill, align, inset and stroke properties, plus the expected value of
the breakable
field.
Returns a final Cell.
Sourcefn x(&self, styles: StyleChain<'_>) -> Smart<usize>
fn x(&self, styles: StyleChain<'_>) -> Smart<usize>
Returns this cell’s column override.
Sourcefn y(&self, styles: StyleChain<'_>) -> Smart<usize>
fn y(&self, styles: StyleChain<'_>) -> Smart<usize>
Returns this cell’s row override.
Sourcefn colspan(&self, styles: StyleChain<'_>) -> NonZeroUsize
fn colspan(&self, styles: StyleChain<'_>) -> NonZeroUsize
The amount of columns spanned by this cell.
Sourcefn rowspan(&self, styles: StyleChain<'_>) -> NonZeroUsize
fn rowspan(&self, styles: StyleChain<'_>) -> NonZeroUsize
The amount of rows spanned by this cell.