#[non_exhaustive]pub struct Table {
pub header: Option<TableRow>,
pub footer: Option<TableRow>,
pub rows: Vec<TableRow>,
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>§rows: Vec<TableRow>§columns: Vec<ColumnFormat>Column format specification for each column (alignment, width, style) Skipped if all columns have default format
location: LocationImplementations§
Source§impl Table
impl Table
Sourcepub fn new(rows: Vec<TableRow>, location: Location) -> Self
pub fn new(rows: Vec<TableRow>, location: Location) -> Self
Create a new table with the given rows and location.
Sourcepub fn with_header(self, header: Option<TableRow>) -> Self
pub fn with_header(self, header: Option<TableRow>) -> 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§
Source§impl<'de> Deserialize<'de> for Table
impl<'de> Deserialize<'de> for Table
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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