#[non_exhaustive]pub struct Table<'a> {
pub header: Option<TableRow<'a>>,
pub footer: Option<TableRow<'a>>,
pub rows: Vec<TableRow<'a>>,
pub columns: Vec<ColumnFormat>,
pub location: Location,
}Expand description
A Table represents a table in a document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.header: Option<TableRow<'a>>§rows: Vec<TableRow<'a>>§columns: Vec<ColumnFormat>Column format specification for each column (alignment, width, style) Skipped if all columns have default format
location: LocationImplementations§
Source§impl<'a> Table<'a>
impl<'a> Table<'a>
Sourcepub fn new(rows: Vec<TableRow<'a>>, location: Location) -> Self
pub fn new(rows: Vec<TableRow<'a>>, location: Location) -> Self
Create a new table with the given rows and location.
Sourcepub fn with_header(self, header: Option<TableRow<'a>>) -> Self
pub fn with_header(self, header: Option<TableRow<'a>>) -> Self
Set the header row.
Set the footer row.
Sourcepub fn with_columns(self, columns: Vec<ColumnFormat>) -> Self
pub fn with_columns(self, columns: Vec<ColumnFormat>) -> Self
Set the column format specifications.
Trait Implementations§
impl<'a> StructuralPartialEq for Table<'a>
Auto Trait Implementations§
impl<'a> Freeze for Table<'a>
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> Send for Table<'a>
impl<'a> Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnsafeUnpin for Table<'a>
impl<'a> UnwindSafe for Table<'a>
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