[][src]Struct cli_grid::Row

pub struct Row {
    pub default_options: Options,
    pub column_width: Option<usize>,
    pub padding_size: Option<usize>,
    pub cells: Vec<Cell>,

Data type for creating a Row for the grid.


default_options: Options

These options will be used if the equivalent is not provided by the underlying Cell type.

column_width: Option<usize>

Width in chars for each column of the Row.

padding_size: Option<usize>

Number of char spaces for each padding space between row columns.

cells: Vec<Cell>

Collection of cells that this Row contains.


impl Row[src]

pub fn new(cells: Vec<Cell>) -> Self[src]

Creates a new Row by its cells.

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

Create a new empty row with a specific column span.

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

Create a new row with a specified column span filled by the repeated content.

pub fn builder(cells: Vec<Cell>) -> RowBuilder[src]

Creates a RowBuilder initiated with cells. To build the final RowBuilder call the build method.

pub fn render(
    f: &mut Formatter<'_>,
    default_options: &Options,
    column_width: Option<usize>,
    padding_size: Option<usize>
) -> Result

Formats the Row into a string.

Trait Implementations

impl Display for Row[src]

Auto Trait Implementations

impl RefUnwindSafe for Row

impl Send for Row

impl Sync for Row

impl Unpin for Row

impl UnwindSafe for Row

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToString for T where
    T: Display + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.