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 Cell
s:
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]
impl<'a> Row<'a>
[src]pub fn new<T>(cells: T) -> Self where
T: IntoIterator,
T::Item: Into<Cell<'a>>,
[src]
T: IntoIterator,
T::Item: Into<Cell<'a>>,
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> StructuralPartialEq for Row<'a>
[src]
impl<'a> StructuralPartialEq for Row<'a>
[src]Auto Trait Implementations
impl<'a> RefUnwindSafe for Row<'a>
impl<'a> RefUnwindSafe for Row<'a>
impl<'a> UnwindSafe for Row<'a>
impl<'a> UnwindSafe for Row<'a>