Struct tui::widgets::Cell[][src]

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

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

You can apply a Style on the entire Cell using Cell::style or rely on the styling capabilities of Text.

Implementations

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

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

Set the Style of this cell.

Trait Implementations

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

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

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

impl<'a, T> From<T> for Cell<'a> where
    T: Into<Text<'a>>, 
[src]

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

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

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

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.