Struct term_table::TableBuilder
source · pub struct TableBuilder { /* private fields */ }
Expand description
Used to create non-mutable tables
Implementations§
source§impl TableBuilder
impl TableBuilder
pub fn new() -> TableBuilder
pub fn rows(&mut self, rows: Vec<Row>) -> &mut Self
pub fn style(&mut self, style: TableStyle) -> &mut Self
sourcepub fn max_column_width(&mut self, max_column_width: usize) -> &mut Self
pub fn max_column_width(&mut self, max_column_width: usize) -> &mut Self
The maximum width of all columns. Overridden by values in column_widths. Defaults to std::usize::max
sourcepub fn max_column_widths(
&mut self,
max_column_widths: HashMap<usize, usize>,
) -> &mut Self
pub fn max_column_widths( &mut self, max_column_widths: HashMap<usize, usize>, ) -> &mut Self
The maximum widths of specific columns. Override max_column
sourcepub fn separate_rows(&mut self, separate_rows: bool) -> &mut Self
pub fn separate_rows(&mut self, separate_rows: bool) -> &mut Self
Whether or not to vertically separate rows in the table
sourcepub fn has_top_boarder(&mut self, has_top_boarder: bool) -> &mut Self
pub fn has_top_boarder(&mut self, has_top_boarder: bool) -> &mut Self
Whether the table should have a top boarder.
Setting has_separator
to false on the first row will have the same effect as setting this to false
sourcepub fn has_bottom_boarder(&mut self, has_bottom_boarder: bool) -> &mut Self
pub fn has_bottom_boarder(&mut self, has_bottom_boarder: bool) -> &mut Self
Whether the table should have a bottom boarder
Trait Implementations§
source§impl Clone for TableBuilder
impl Clone for TableBuilder
source§fn clone(&self) -> TableBuilder
fn clone(&self) -> TableBuilder
Returns a copy of the value. Read more
1.0.0 · 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 TableBuilder
impl Debug for TableBuilder
Auto Trait Implementations§
impl Freeze for TableBuilder
impl RefUnwindSafe for TableBuilder
impl Send for TableBuilder
impl Sync for TableBuilder
impl Unpin for TableBuilder
impl UnwindSafe for TableBuilder
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)