Enum layout_2020::table::TableSlot
source · pub enum TableSlot {
Cell(TableSlotCell),
Spanned(Vec<TableSlotOffset>),
Empty,
}
Expand description
A single table slot. It may be an actual cell, or a reference to a previous cell that is spanned here
In case of table model errors, it may be multiple references
Variants§
Cell(TableSlotCell)
A table cell, with a colspan and a rowspan.
Spanned(Vec<TableSlotOffset>)
This slot is spanned by one or more multiple cells earlier in the table, which are found at the given negative coordinate offsets. The vector is in the order of most recent to earliest cell.
If there is more than one cell that spans a slot, this is a table model error, but we still keep track of it. See https://html.spec.whatwg.org/multipage/#table-model-error
Empty
An empty spot in the table. This can happen when there is a gap in columns between cells that are defined and one which should exist because of cell with a rowspan from a previous row.
Implementations§
source§impl TableSlot
impl TableSlot
sourcepub fn push_spanned(&mut self, new_offset: TableSlotOffset)
pub fn push_spanned(&mut self, new_offset: TableSlotOffset)
Merge a TableSlot::Spanned(x, y) with this (only for model errors)
source§impl TableSlot
impl TableSlot
fn new_spanned(offset: TableSlotOffset) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableSlot
impl !RefUnwindSafe for TableSlot
impl Send for TableSlot
impl Sync for TableSlot
impl Unpin for TableSlot
impl !UnwindSafe for TableSlot
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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