pub struct TableCell {
pub properties: Option<TableCellProperties>,
pub paragraphs: Vec<Paragraph>,
pub unknown_children: Vec<RawXmlNode>,
}Expand description
Table cell (w:tc)
Fields§
§properties: Option<TableCellProperties>Cell properties
paragraphs: Vec<Paragraph>Cell content (paragraphs)
unknown_children: Vec<RawXmlNode>Unknown children (preserved)
Implementations§
Source§impl TableCell
impl TableCell
Sourcepub fn set_text(&mut self, text: impl Into<String>)
pub fn set_text(&mut self, text: impl Into<String>)
Set the cell text (replaces all paragraphs with a single one)
Sourcepub fn add_paragraph(&mut self, para: Paragraph)
pub fn add_paragraph(&mut self, para: Paragraph)
Add a paragraph to the cell
Sourcepub fn set_grid_span(&mut self, span: u32)
pub fn set_grid_span(&mut self, span: u32)
Set horizontal merge (grid span)
Sourcepub fn set_v_merge(&mut self, v_merge: VMerge)
pub fn set_v_merge(&mut self, v_merge: VMerge)
Set vertical merge
Sourcepub fn set_v_align(&mut self, align: impl Into<String>)
pub fn set_v_align(&mut self, align: impl Into<String>)
Set vertical alignment
Sourcepub fn from_reader<R: BufRead>(
reader: &mut Reader<R>,
_start: &BytesStart<'_>,
) -> Result<Self>
pub fn from_reader<R: BufRead>( reader: &mut Reader<R>, _start: &BytesStart<'_>, ) -> Result<Self>
Parse from reader
Sourcepub fn paragraphs(&self) -> impl Iterator<Item = &Paragraph>
pub fn paragraphs(&self) -> impl Iterator<Item = &Paragraph>
Iterate over paragraphs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableCell
impl RefUnwindSafe for TableCell
impl Send for TableCell
impl Sync for TableCell
impl Unpin 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