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

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

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

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

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

Implementations

impl<'a> Row<'a>[src]

pub fn new<T>(cells: T) -> Self where
    T: IntoIterator,
    T::Item: Into<Cell<'a>>, 
[src]

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

pub fn height(self, height: u16) -> Self[src]

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

pub fn style(self, style: Style) -> Self[src]

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.

pub fn bottom_margin(self, margin: u16) -> Self[src]

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

Trait Implementations

impl<'a> Clone for Row<'a>[src]

impl<'a> Debug for Row<'a>[src]

impl<'a> Default for Row<'a>[src]

impl<'a> PartialEq<Row<'a>> for Row<'a>[src]

impl<'a> StructuralPartialEq for Row<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Row<'a>

impl<'a> Send for Row<'a>

impl<'a> Sync for Row<'a>

impl<'a> Unpin for Row<'a>

impl<'a> UnwindSafe for Row<'a>

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.