pub struct Row { /* private fields */ }Implementations§
Source§impl Row
impl Row
pub fn new() -> Self
Sourcepub fn add_cell(&mut self, cell: Cell) -> &mut Self
pub fn add_cell(&mut self, cell: Cell) -> &mut Self
Add a cell to the row.
Attention: If a row has already been added to a table and you add more cells to it than there’re columns currently know to the Table struct, these columns won’t be known to the table unless you call crate::Table::discover_columns.
use comfy_table::{Cell, Row};
let mut row = Row::new();
row.add_cell(Cell::new("One"));Sourcepub fn max_height(&mut self, lines: usize) -> &mut Self
pub fn max_height(&mut self, lines: usize) -> &mut Self
Truncate content of cells which occupies more than X lines of space.
use comfy_table::{Cell, Row};
let mut row = Row::new();
row.max_height(5);Sourcepub fn cell_count(&self) -> usize
pub fn cell_count(&self) -> usize
Get the amount of cells on this row.
Trait Implementations§
Source§impl<T: Into<Cells>> From<T> for Row
Create a Row from any Into<Cells>.
Cells is a simple wrapper around a Vec<Cell>.
impl<T: Into<Cells>> From<T> for Row
Create a Row from any Into<Cells>.
Cells is a simple wrapper around a Vec<Cell>.
Auto Trait Implementations§
impl Freeze for Row
impl RefUnwindSafe for Row
impl Send for Row
impl Sync for Row
impl Unpin for Row
impl UnsafeUnpin for Row
impl UnwindSafe for Row
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