use crate::block::{Block, BorderStyle}; use crate::style::{self, Align, Line, Span, Style}; /// How to size a table column. #[derive(Debug, Clone)] pub enum ColumnWidth { /// Exactly this many characters wide. Fixed(usize), /// Fit the widest content (header or cell). Auto, /// Take a proportional share of leftover space after Fixed/Auto columns. Flex(usize), } /// A table with optional headers, rows, configurable column widths, and borders. #[derive(Debug, Clone)] pub struct Table { headers: Option>, rows: Vec>, column_widths: Vec, border: BorderStyle, header_style: Option