[−][src]Struct comfy_table::table::Table
The representation of a table.
Fields
table_style: TableStyleMethods
impl Table[src]
pub fn new() -> Self[src]
Create a new table with default ASCII styling, no rows and a header
pub fn to_string(&mut self) -> String[src]
pub fn set_header<T: ToRow>(&mut self, row: T) -> &mut Self[src]
Set the header row of the table. This is usually the title of each column.
pub fn get_header(&self) -> Option<&Row>[src]
pub fn load_preset(&mut self, preset: &str)[src]
Convenience wrapper for table.table_style.load_preset()
pub fn apply_modifier(&mut self, modifier: &str)[src]
Convenience wrapper for table.table_style.apply_modifier()
pub fn add_row<T: ToRow>(&mut self, row: T) -> &mut Self[src]
Add a new row to the table.
pub fn get_column(&self, index: usize) -> Option<&Column>[src]
pub fn get_column_mut(&mut self, index: usize) -> Option<&mut Column>[src]
pub fn column_max_content_widths(&self) -> Vec<u16>[src]
Return a vector representing the maximum amount of characters in any line of this column. This is mostly needed for internal testing and formatting, but it can be interesting if you want to check how wide the longest line for each column is during runtime.
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
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,