pub struct AdvancedTable {Show 15 fields
pub title: Option<String>,
pub x: f64,
pub y: f64,
pub columns: Vec<Column>,
pub rows: Vec<RowData>,
pub header: Option<HeaderBuilder>,
pub show_header: bool,
pub default_style: CellStyle,
pub header_style: CellStyle,
pub zebra_striping: Option<ZebraConfig>,
pub table_border: bool,
pub cell_spacing: f64,
pub total_width: Option<f64>,
pub repeat_headers: bool,
pub cell_styles: HashMap<(usize, usize), CellStyle>,
}Expand description
Complete advanced table configuration
Fields§
§title: Option<String>Table title
x: f64X position on page
y: f64Y position on page
columns: Vec<Column>Table columns definition
rows: Vec<RowData>Table rows data
header: Option<HeaderBuilder>Header configuration
show_header: boolWhether to show the table header
default_style: CellStyleDefault cell style
header_style: CellStyleHeader style
zebra_striping: Option<ZebraConfig>Zebra striping configuration
table_border: boolTable-wide border style
cell_spacing: f64Spacing between cells
total_width: Option<f64>Total table width (auto-calculated if None)
repeat_headers: boolWhether to repeat headers on page breaks
cell_styles: HashMap<(usize, usize), CellStyle>Styles for specific cells (row, col) -> style
Implementations§
Source§impl AdvancedTable
impl AdvancedTable
Sourcepub fn calculate_width(&self) -> f64
pub fn calculate_width(&self) -> f64
Get the total calculated width of the table
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Get the number of columns
Sourcepub fn get_cell_style(&self, row: usize, col: usize) -> CellStyle
pub fn get_cell_style(&self, row: usize, col: usize) -> CellStyle
Get style for a specific cell, considering row/column defaults and zebra striping
Sourcepub fn get_cell_style_ref(&self, row: usize, col: usize) -> &CellStyle
pub fn get_cell_style_ref(&self, row: usize, col: usize) -> &CellStyle
Get a reference to the style for a specific cell, considering row/column defaults.
Returns a reference for the common cases (cell-specific, row, or column style).
When zebra striping would modify the style, falls back to the base column or default style
without applying the zebra background. Use [get_cell_style] when zebra colors are needed.
Sourcepub fn validate(&self) -> Result<(), TableError>
pub fn validate(&self) -> Result<(), TableError>
Validate table structure (e.g., consistent column counts with colspan/rowspan)
Trait Implementations§
Source§impl Clone for AdvancedTable
impl Clone for AdvancedTable
Source§fn clone(&self) -> AdvancedTable
fn clone(&self) -> AdvancedTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more