Struct comfy_table::Row[][src]

pub struct Row { /* fields omitted */ }
Expand description

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

Implementations

Add a cell to the row.

use comfy_table::{Row, Cell};

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

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);

Get the amount of cells on this row.

Returns an iterator over all cells of this row

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Create a Row from any Into<Cells>.
Cells is a simple wrapper around a Vec<Cell>.

Check the From implementations on Cell for more information.

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]);

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.