pub struct TableConfig {
pub headers: Vec<Cell>,
pub rows: Vec<Vec<Cell>>,
pub column_widths: Vec<f64>,
pub row_height: f64,
pub header_position: HeaderPosition,
pub border: Border,
pub header_bg: Option<Color>,
pub width: f64,
pub x: f64,
pub y: f64,
}Fields§
§headers: Vec<Cell>§rows: Vec<Vec<Cell>>§column_widths: Vec<f64>§row_height: f64§header_position: HeaderPosition§border: Border§header_bg: Option<Color>§width: f64§x: f64§y: f64Implementations§
Source§impl TableConfig
impl TableConfig
pub fn new() -> Self
pub fn headers(self, headers: Vec<Cell>) -> Self
pub fn header_labels(self, labels: &[&str]) -> Self
pub fn rows(self, rows: Vec<Vec<Cell>>) -> Self
pub fn row(self, cells: Vec<Cell>) -> Self
pub fn column_widths(self, widths: Vec<f64>) -> Self
pub fn auto_width(self, total_width: f64, n_cols: usize) -> Self
pub fn row_height(self, height: f64) -> Self
pub fn header_position(self, pos: HeaderPosition) -> Self
pub fn border(self, border: Border) -> Self
pub fn header_bg(self, color: Color) -> Self
pub fn position(self, x: f64, y: f64) -> Self
pub fn width(self, w: f64) -> Self
pub fn compute_widths(&self) -> Vec<f64>
pub fn column_count(&self) -> usize
pub fn cell_bounds(&self, row: usize, col: usize) -> Option<Rect>
Trait Implementations§
Source§impl Clone for TableConfig
impl Clone for TableConfig
Source§fn clone(&self) -> TableConfig
fn clone(&self) -> TableConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableConfig
impl Debug for TableConfig
Auto Trait Implementations§
impl Freeze for TableConfig
impl RefUnwindSafe for TableConfig
impl Send for TableConfig
impl Sync for TableConfig
impl Unpin for TableConfig
impl UnsafeUnpin for TableConfig
impl UnwindSafe for TableConfig
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