pub struct Cell<'a> { /* private fields */ }
Expand description
A Cell
contains the Text
to be displayed in a Row
of a Table
.
It can be created from anything that can be converted to a Text
.
Cell::from("simple string");
Cell::from(Span::from("span"));
Cell::from(Spans::from(vec![
Span::raw("a vec of "),
Span::styled("spans", Style::default().add_modifier(Modifier::BOLD))
]));
Cell::from(Text::from("a text"));
Cell::from(Text::from(Cow::Borrowed("hello")));
You can apply a Style
on the entire Cell
using Cell::style
or rely on the styling
capabilities of Text
.
Implementations
Trait Implementations
impl<'a> Eq for Cell<'a>
impl<'a> StructuralEq for Cell<'a>
impl<'a> StructuralPartialEq for Cell<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Cell<'a>
impl<'a> Send for Cell<'a>
impl<'a> Sync for Cell<'a>
impl<'a> Unpin for Cell<'a>
impl<'a> UnwindSafe for Cell<'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