pub struct Table { /* private fields */ }Expand description
A more horizontally compact leaf for Report.
Implementations§
Source§impl Table
impl Table
Sourcepub fn new<I>(headers: I) -> Self
pub fn new<I>(headers: I) -> Self
Create a new empty Table with the specified headers.
Trying to add a new row via Table::push_row will fail is the row does not
contain the same number of entries as headers.
Sourcepub fn status(&self) -> Status
pub fn status(&self) -> Status
Return the overall status of the table.
Status::Fail will be returned if any internal check is a failure.
Sourcepub fn ncols(&self) -> usize
pub fn ncols(&self) -> usize
Return the number of columns in the table.
This is equal to the number of headers provided to Table::new.
Sourcepub fn new_row(&self) -> Row
pub fn new_row(&self) -> Row
Construct a new Row.
The returned Row will not be automatically added to the table. Use
Table::push_row to add it.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Table
impl !Send for Table
impl !Sync for Table
impl !UnwindSafe for Table
impl Forget for Table
impl Freeze for Table
impl Move for Table
impl Unpin for Table
impl UnsafeUnpin 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