pub struct Row<'a> { /* private fields */ }
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"]);
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)),
]);
You can also construct a row from any type that can be converted into Text
:
Row::new(vec![
Cow::Borrowed("hello"),
Cow::Owned("world".to_uppercase()),
]);
By default, a row has a height of 1 but you can change this using Row::height
.
Implementations
sourceimpl<'a> Row<'a>
impl<'a> Row<'a>
Trait Implementations
impl<'a> Eq for Row<'a>
impl<'a> StructuralEq for Row<'a>
impl<'a> StructuralPartialEq for Row<'a>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more