pub struct TableCell {
pub content: TextContent,
pub children: GeneralContainer,
pub colspan: usize,
pub rowspan: usize,
pub align: TableCellAlignment,
pub header: bool,
pub location: Range,
}Expand description
A single cell in a table row.
Fields§
§content: TextContentThe cell’s inline content (trimmed text, inline-parsed)
children: GeneralContainerBlock-level children (lists, definitions, etc.) when cell has block content
colspan: usizeNumber of columns this cell spans (1 = no merge)
rowspan: usizeNumber of rows this cell spans (1 = no merge)
align: TableCellAlignmentColumn alignment for this cell
header: boolWhether this cell is in a header row
location: RangeByte range location
Implementations§
Source§impl TableCell
impl TableCell
pub fn new(content: TextContent) -> Self
pub fn with_children(self, children: Vec<ContentElement>) -> Self
Sourcepub fn has_block_content(&self) -> bool
pub fn has_block_content(&self) -> bool
Whether this cell has block-level content (lists, definitions, etc.)
pub fn with_span(self, colspan: usize, rowspan: usize) -> Self
pub fn with_align(self, align: TableCellAlignment) -> Self
pub fn with_header(self, header: bool) -> Self
pub fn at(self, location: Range) -> Self
Trait Implementations§
impl StructuralPartialEq for TableCell
Auto Trait Implementations§
impl Freeze for TableCell
impl RefUnwindSafe for TableCell
impl Send for TableCell
impl Sync for TableCell
impl Unpin for TableCell
impl UnsafeUnpin for TableCell
impl UnwindSafe for TableCell
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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