pub struct Table {
pub rows: Vec<TableRow>,
pub column_widths: Vec<u32>,
pub x: u32,
pub y: u32,
}Expand description
Table definition with rows and positioning
Fields§
§rows: Vec<TableRow>Table rows
column_widths: Vec<u32>Column widths in EMU
x: u32X position in EMU
y: u32Y position in EMU
Implementations§
Source§impl Table
impl Table
Sourcepub fn new(rows: Vec<TableRow>, column_widths: Vec<u32>, x: u32, y: u32) -> Self
pub fn new(rows: Vec<TableRow>, column_widths: Vec<u32>, x: u32, y: u32) -> Self
Create a new table with explicit rows, column widths, and position
Sourcepub fn from_data(
data: Vec<Vec<&str>>,
column_widths: Vec<u32>,
x: u32,
y: u32,
) -> Self
pub fn from_data( data: Vec<Vec<&str>>, column_widths: Vec<u32>, x: u32, y: u32, ) -> Self
Create a table from raw data (2D string array)
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Get the number of columns
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnsafeUnpin for Table
impl UnwindSafe for Table
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