Struct term_grid::Grid
[−]
[src]
pub struct Grid { /* fields omitted */ }
Everything needed to format the cells with the grid options.
For more information, see the module-level documentation.
Methods
impl Grid
[src]
pub fn new(options: GridOptions) -> Grid
[src]
Creates a new grid view with the given options.
pub fn reserve(&mut self, additional: usize)
[src]
Reserves space in the vector for the given number of additional cells
to be added. (See vec#reserve
)
pub fn add(&mut self, cell: Cell)
[src]
Adds another cell onto the vector.
pub fn fit_into_width(&self, maximum_width: Width) -> Option<Display>
[src]
Returns a displayable grid that's been packed to fit into the given width in the fewest number of rows.
Returns None
if any of the cells has a width greater than the
maximum width.
pub fn fit_into_columns(&self, num_columns: usize) -> Display
[src]
Returns a displayable grid with the given number of columns, and no maximum width.
Trait Implementations
impl PartialEq for Grid
[src]
fn eq(&self, __arg_0: &Grid) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Grid) -> bool
[src]
This method tests for !=
.