[−][src]Struct term_grid::Grid
Everything needed to format the cells with the grid options.
For more information, see the term_grid
crate documentation.
Methods
impl Grid
[src]
pub fn new(options: GridOptions) -> Self
[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 the Vec::reserve
function.)
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
Auto Trait Implementations
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnwindSafe for Grid
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,
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.
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>,