Struct tuirealm::tui::widgets::Row[][src]

pub struct Row<'a> { /* fields omitted */ }
Expand description

Holds data to be displayed in a Table widget.

A Row is a collection of cells. It can be created from simple strings:

Row::new(vec!["Cell1", "Cell2", "Cell3"]);
Run

But if you need a bit more control over individual cells, you can explicity create Cells:

Row::new(vec![
    Cell::from("Cell1"),
    Cell::from("Cell2").style(Style::default().fg(Color::Yellow)),
]);
Run

By default, a row has a height of 1 but you can change this using Row::height.

Implementations

Creates a new Row from an iterator where items can be converted to a Cell.

Set the fixed height of the Row. Any Cell whose content has more lines than this height will see its content truncated.

Set the Style of the entire row. This Style can be overriden by the Style of a any individual Cell or event by their Text content.

Set the bottom margin. By default, the bottom margin is 0.

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.