[−][src]Struct cli_grid::Cell
Data type that represents options for a cell and its content.
Fields
content: StringThe 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,