pub struct CellSpec {
pub row: u32,
pub col: u32,
pub row_span: u32,
pub col_span: u32,
pub align: Option<CellAlign>,
pub header: Option<CellHeader>,
pub rules: Vec<CellEdge>,
pub styles: Vec<Name>,
}Expand description
One cell of a CellsPayload: its position in the grid, how many rows
and columns it spans, and the facts its style tokens state about it.
Rows and columns are counted from zero here (the syntax counts from one).
A cell occupies the rectangle of grid positions from (row, col) to
(row + row_span - 1, col + col_span - 1); its top-left position is
(row, col). Every fact is backend-neutral: a backend renders what it can
express and ignores the rest (the plain-text backend shows the alignment and
a column header only).
Fields§
§row: u32The row of the cell’s top-left position, from zero.
col: u32The column of the cell’s top-left position, from zero.
row_span: u32How many rows the cell spans; at least one.
col_span: u32How many columns the cell spans; at least one.
align: Option<CellAlign>The cell’s alignment, when its style tokens give one.
header: Option<CellHeader>Whether the cell is a header, and of what.
rules: Vec<CellEdge>The edges at which a rule is drawn, each once, in the order the style tokens list them.
styles: Vec<Name>The cell styles the cell carries, by name, in the order the style tokens list them. A backend renders each by a convention of its own (an attribute on HTML, a table command on the recomposed LaTeX), and the host’s definitions for that backend give the name its meaning.
Implementations§
Trait Implementations§
impl Eq for CellSpec
impl StructuralPartialEq for CellSpec
Auto Trait Implementations§
impl Forget for CellSpec
impl Freeze for CellSpec
impl Move for CellSpec
impl RefUnwindSafe for CellSpec
impl Send for CellSpec
impl Sync for CellSpec
impl Unpin for CellSpec
impl UnsafeUnpin for CellSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<CellEdge>: UnsafeUnpin,
PhantomData<Name>: UnsafeUnpin,
impl UnwindSafe for CellSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more