[−][src]Struct cli_grid::Row
Data type for creating a Row
for the grid.
Fields
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.
Implementations
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(
&self,
f: &mut Formatter<'_>,
default_options: &Options,
column_width: Option<usize>,
padding_size: Option<usize>
) -> Result
[src]
&self,
f: &mut Formatter<'_>,
default_options: &Options,
column_width: Option<usize>,
padding_size: Option<usize>
) -> Result
Formats the Row
into a string.
Trait Implementations
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,
[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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,