[][src]Struct comfy_table::Row

pub struct Row { /* fields omitted */ }

Each row contains Cells and can be added to a Table.

Implementations

impl Row[src]

pub fn new() -> Row[src]

pub fn from<T: ToCells>(cells: T) -> Row[src]

Create a Row from any Iter<T: ToCell>

use comfy_table::{Row, Cell};

let row = Row::from(vec!["One", "Two", "Three",]);
let row = Row::from(vec![
   Cell::new("One"),
   Cell::new("Two"),
   Cell::new("Three"),
]);
let row = Row::from(vec![1, 2, 3, 4]);

pub fn add_cell(&mut self, cell: Cell) -> &mut Self[src]

Add a cell to the row.

use comfy_table::{Row, Cell};

let mut row = Row::new();
row.add_cell(Cell::new("One"));

pub fn max_height(&mut self, lines: usize) -> &mut Self[src]

Truncate content of cells which occupies more than X lines of space.

use comfy_table::{Row, Cell};

let mut row = Row::new();
row.max_height(5);

pub fn cell_count(&self) -> usize[src]

Return the amount of cells on this row.

pub fn cell_iter(&self) -> Iter<'_, Cell>[src]

An iterator over all cells of this row

Trait Implementations

impl Clone for Row[src]

impl Debug for Row[src]

impl Default for Row[src]

impl ToRow for Row[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.