Trait ResolvableCell

Source
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§

Source

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.

Source

fn x(&self, styles: StyleChain<'_>) -> Smart<usize>

Returns this cell’s column override.

Source

fn y(&self, styles: StyleChain<'_>) -> Smart<usize>

Returns this cell’s row override.

Source

fn colspan(&self, styles: StyleChain<'_>) -> NonZeroUsize

The amount of columns spanned by this cell.

Source

fn rowspan(&self, styles: StyleChain<'_>) -> NonZeroUsize

The amount of rows spanned by this cell.

Source

fn span(&self) -> Span

The cell’s span, for errors.

Implementors§