pub struct Table<'a> { /* private fields */ }
Expand description
Holds a table to be printed.
Do not use this to store data, it just holds references to elsewhere. This structure is meant to be created just when it is used.
Implementations§
Source§impl<'a> Table<'a>
Base functions
impl<'a> Table<'a>
Base functions
Sourcepub fn add_row(&mut self, r: &[&'a str]) -> TableResult<()>
pub fn add_row(&mut self, r: &[&'a str]) -> TableResult<()>
Can error if the length of r has a mismatching number of columns.
Source§impl<'a> Table<'a>
Type conversions.
impl<'a> Table<'a>
Type conversions.
Sourcepub fn from_vec2d<'b>(vector: &Vec<Vec<&'a str>>) -> TableResult<Table<'a>>
pub fn from_vec2d<'b>(vector: &Vec<Vec<&'a str>>) -> TableResult<Table<'a>>
Creates from a two dimensional vector.
Could return TableError::MismatchedRowWidth if there are a different number of elements in rows.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Table<'a>
impl<'a> RefUnwindSafe for Table<'a>
impl<'a> Send for Table<'a>
impl<'a> Sync for Table<'a>
impl<'a> Unpin for Table<'a>
impl<'a> UnwindSafe for Table<'a>
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