pub struct Table<'a> {
pub property: TableProperty<'a>,
pub grids: Vec<TableGrid>,
pub rows: Vec<TableRow<'a>>,
}
Expand description
Table
use docx_rust::document::*;
use docx_rust::formatting::*;
let tbl = Table::default()
.property(TableProperty::default())
.push_grid(vec![1, 2, 3])
.push_grid(TableGrid::default())
.push_row(TableRow::default());
Fields§
§property: TableProperty<'a>
§grids: Vec<TableGrid>
§rows: Vec<TableRow<'a>>
Implementations§
source§impl<'a> Table<'a>
impl<'a> Table<'a>
pub fn property<T: Into<TableProperty<'a>>>(self, value: T) -> Self
pub fn push_grid<T: Into<TableGrid>>(self, grid: T) -> Self
pub fn push_row<T: Into<TableRow<'a>>>(self, row: T) -> Self
pub fn iter_text(&self) -> impl Iterator<Item = &Cow<'a, str>>
pub fn iter_text_mut(&mut self) -> impl Iterator<Item = &mut Cow<'a, str>>
Trait Implementations§
source§impl<'a> From<Table<'a>> for BodyContent<'a>
impl<'a> From<Table<'a>> for BodyContent<'a>
source§fn from(original: Table<'a>) -> BodyContent<'a>
fn from(original: Table<'a>) -> BodyContent<'a>
Converts to this type from the input type.