pub struct Grid { /* private fields */ }Expand description
Everything needed to format the cells with the grid options.
For more information, see the module-level documentation.
Implementations§
Source§impl Grid
impl Grid
Sourcepub fn new(options: GridOptions) -> Grid
pub fn new(options: GridOptions) -> Grid
Creates a new grid view with the given options.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves space in the vector for the given number of additional cells
to be added. (See vec#reserve)
Sourcepub fn fit_into_width(&self, maximum_width: usize) -> Option<Display<'_>>
pub fn fit_into_width(&self, maximum_width: usize) -> Option<Display<'_>>
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.
Sourcepub fn fit_into_columns(&self, num_columns: usize) -> Display<'_>
pub fn fit_into_columns(&self, num_columns: usize) -> Display<'_>
Returns a displayable grid with the given number of columns, and no maximum width.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnsafeUnpin for Grid
impl UnwindSafe for Grid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more