[][src]Struct cli_grid::Cell

pub struct Cell {
    pub content: String,
    pub col_span: Option<usize>,
    pub h_align: Option<HAlign>,
    pub v_align: Option<VAlign>,
    pub blank_char: Option<char>,
}

Data type that represents options for a cell and its content.

Fields

content: String

The content of the cell. It can be a multi line string or even a nested Grid.

col_span: Option<usize>

Number of columns that this cell will be spreads out into. If None specified, the value col_span of the grid will be used. If col_span of the grid also is None, value 1 will be used.

Panics

Panics if 0 is specified.

h_align: Option<HAlign>

Align content of the cell horizontally. If None specified, the value h_align of the grid will be used. If h_align of the grid also is None, HAlign::Left will be used.

v_align: Option<VAlign>

Align content of the cell vertically. If None specified, the value v_align of the grid will be used. If v_align of the grid also is None, VAlign::Top will be used.

blank_char: Option<char>

Fill cell padding spaces by this char value. If None specified, the value blank_char of the grid will be used. If blank_char of the grid also is None, white space char ('\x20') will be used.

Implementations

impl Cell[src]

pub fn new(content: String, col_span: usize) -> Self[src]

Create a new Cell by its content and col_span properties. To specify other properties, use the builder method instead.

pub fn new_fill(content: String, col_span: usize) -> Self[src]

Creates a Cell with the specified col_span. The entire width of the cell will be filled by repeating the content.

pub fn new_empty(col_span: usize) -> Self[src]

Creates an empty Cell with the specified col_span. To specify other properties, use the builder method instead.

pub fn builder(content: String, col_span: usize) -> CellBuilder[src]

Creates a CellBuilder initiated with content and col_span properties. To build the final CellBuilder call the build method.

Auto Trait Implementations

impl RefUnwindSafe for Cell

impl Send for Cell

impl Sync for Cell

impl Unpin for Cell

impl UnwindSafe for Cell

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, 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.