pub struct AdvancedTable {Show 17 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 zebra_color: Option<Color>,
pub zebra_stripes: bool,
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
zebra_color: Option<Color>Zebra stripe color
zebra_stripes: boolZebra stripes enabled
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 validate(&self) -> Result<(), TableError>
pub fn validate(&self) -> Result<(), TableError>
Validate table structure (e.g., consistent column counts)
Trait Implementations§
Source§impl Clone for AdvancedTable
impl Clone for AdvancedTable
Source§fn clone(&self) -> AdvancedTable
fn clone(&self) -> AdvancedTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdvancedTable
impl RefUnwindSafe for AdvancedTable
impl Send for AdvancedTable
impl Sync for AdvancedTable
impl Unpin for AdvancedTable
impl UnwindSafe for AdvancedTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more