pub struct Table { /* private fields */ }
Implementations
sourceimpl Table
impl Table
pub fn new(styles: Styles, cols: Vec<Col>, rows: Vec<Row>) -> Self
pub fn with_styles(styles: Styles) -> Self
pub fn with_cols(self, cols: Vec<Col>) -> Self
pub fn with_row<R: Into<Row>>(self, row: R) -> Self
sourcepub fn set_cols(&mut self, cols: Vec<Col>)
pub fn set_cols(&mut self, cols: Vec<Col>)
Assigns columns to the table. The number of columns cannot be less (but may exceed) the number of cells in the widest row.
Panics
If the number of columns is fewer than the number of cells in the widest row.
pub fn push_row<R: Into<Row>>(&mut self, row: R)
pub fn push_rows<I: IntoIterator<Item = Row>>(&mut self, it: I)
pub fn num_rows(&self) -> usize
pub fn num_cols(&self) -> usize
pub fn col(&self, col: usize) -> Element<'_, Col>
pub fn row(&self, row_idx: usize) -> Element<'_, Row>
pub fn cell(&self, col_idx: usize, row_idx: usize) -> Element<'_, Cell>
pub fn is_empty(&self) -> bool
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Table
impl !Send for Table
impl !Sync for Table
impl Unpin for Table
impl !UnwindSafe for Table
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more