Skip to main content

AdvancedTableBuilder

Struct AdvancedTableBuilder 

Source
pub struct AdvancedTableBuilder { /* private fields */ }
Expand description

Builder for creating advanced tables with fluent API

Implementations§

Source§

impl AdvancedTableBuilder

Source

pub fn new() -> Self

Create a new table builder

Source

pub fn add_column<S: Into<String>>(self, header: S, width: f64) -> Self

Add a column to the table

Source

pub fn add_styled_column<S: Into<String>>( self, header: S, width: f64, style: CellStyle, ) -> Self

Add a column with custom styling

Source

pub fn columns_equal_width(self, headers: Vec<&str>, total_width: f64) -> Self

Set columns from a list of headers with equal widths

Source

pub fn add_row(self, content: Vec<&str>) -> Self

Add a simple row from string content

Source

pub fn add_row_with_min_height( self, content: Vec<&str>, min_height: f64, ) -> Self

Source

pub fn add_row_cells(self, cells: Vec<CellData>) -> Self

Add a row with cell data

Source

pub fn add_styled_row(self, content: Vec<&str>, style: CellStyle) -> Self

Add a styled row

Source

pub fn default_style(self, style: CellStyle) -> Self

Set default cell style

Source

pub fn data_style(self, style: CellStyle) -> Self

Set data cell style (alias for default_style)

Source

pub fn header_style(self, style: CellStyle) -> Self

Set header style

Source

pub fn show_header(self, show: bool) -> Self

Control header visibility

Source

pub fn title<S: Into<String>>(self, title: S) -> Self

Set table title

Source

pub fn columns(self, column_specs: Vec<(&str, f64)>) -> Self

Set table columns from (header, width) tuples

Source

pub fn position(self, x: f64, y: f64) -> Self

Set table position on page

Source

pub fn complex_header(self, header: HeaderBuilder) -> Self

Add a complex header using HeaderBuilder

Source

pub fn zebra_stripes(self, enabled: bool, color: Color) -> Self

Enable zebra stripes

Source

pub fn add_row_with_style(self, content: Vec<&str>, style: CellStyle) -> Self

Add row with custom style

Source

pub fn add_row_with_mixed_styles(self, cells: Vec<(CellStyle, &str)>) -> Self

Add row with mixed cell styles

Source

pub fn build(self) -> Result<AdvancedTable, TableError>

Build with error handling (for compatibility with tests)

Source

pub fn zebra_striping(self, color: Color) -> Self

Enable zebra striping

Source

pub fn zebra_striping_custom(self, config: ZebraConfig) -> Self

Enable custom zebra striping

Source

pub fn table_border(self, enabled: bool) -> Self

Enable or disable table border

Source

pub fn cell_spacing(self, spacing: f64) -> Self

Set cell spacing

Source

pub fn total_width(self, width: f64) -> Self

Set total table width

Source

pub fn repeat_headers(self, repeat: bool) -> Self

Enable header repetition on page breaks

Source

pub fn set_cell_style(self, row: usize, col: usize, style: CellStyle) -> Self

Set style for a specific cell

Source

pub fn add_data(self, data: Vec<Vec<&str>>) -> Self

Add bulk data from a 2D vector

Source

pub fn financial_table(self) -> Self

Create a financial table with common styling

Source

pub fn minimal_table(self) -> Self

Create a data table with minimal styling

Trait Implementations§

Source§

impl Default for AdvancedTableBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more