pub struct Table { /* private fields */ }Expand description
A table for displaying structured data.
Implementations§
Source§impl Table
impl Table
Sourcepub fn add_column<C: Into<Column>>(&mut self, column: C) -> &mut Self
pub fn add_column<C: Into<Column>>(&mut self, column: C) -> &mut Self
Add a column to the table.
Sourcepub fn add_row_strs(&mut self, cells: &[&str]) -> &mut Self
pub fn add_row_strs(&mut self, cells: &[&str]) -> &mut Self
Add a row from string slices (convenience method).
Sourcepub fn add_row_obj(&mut self, row: Row) -> &mut Self
pub fn add_row_obj(&mut self, row: Row) -> &mut Self
Add a Row object to the table.
Sourcepub fn border_style(self, style: BorderStyle) -> Self
pub fn border_style(self, style: BorderStyle) -> Self
Set the border style.
Sourcepub fn show_header(self, show: bool) -> Self
pub fn show_header(self, show: bool) -> Self
Set whether to show the header.
Sourcepub fn show_border(self, show: bool) -> Self
pub fn show_border(self, show: bool) -> Self
Set whether to show the border.
Sourcepub fn show_row_lines(self, show: bool) -> Self
pub fn show_row_lines(self, show: bool) -> Self
Set whether to show row separator lines.
Trait Implementations§
Source§impl Renderable for Table
impl Renderable for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Measurable for Twhere
T: Renderable,
impl<T> Measurable for Twhere
T: Renderable,
Source§fn measure(&self, width: usize) -> Measurement
fn measure(&self, width: usize) -> Measurement
Measure this renderable at the given width.