[][src]Struct text_grid::Cell

pub struct Cell<T> { /* fields omitted */ }

Implementation of CellSource that can specify styles.

Methods

impl<T: CellSource> Cell<T>[src]

pub fn new(source: T) -> Self[src]

Create a new Cell with specified CellSource and empty style.

pub fn left(self) -> Self[src]

Return the cell with horizontal alignment set to the left.

pub fn right(self) -> Self[src]

Return the cell with horizontal alignment set to the right.

pub fn center(self) -> Self[src]

Return the cell with horizontal alignment set to the center.

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

Return the cell with an empty style replaced by the specified style.

Judgment as to whether the style is empty or not is done for each individual element.

impl Cell<String>[src]

pub fn empty() -> Self[src]

Create a new Cell with empty string and empty style.

Trait Implementations

impl<T: CellSource> CellSource for Cell<T>[src]

fn default_style() -> CellStyle[src]

Return cell's default style that associated with Self type.

Auto Trait Implementations

impl<T> Send for Cell<T> where
    T: Send

impl<T> Sync for Cell<T> where
    T: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.