pub struct GridLayout { /* private fields */ }Expand description
Result of solving a grid layout.
Implementations§
Source§impl GridLayout
impl GridLayout
Sourcepub fn cell(&self, row: usize, col: usize) -> Rect
pub fn cell(&self, row: usize, col: usize) -> Rect
Get the rectangle for a specific cell.
Returns an empty Rect if coordinates are out of bounds.
Sourcepub fn span(
&self,
row: usize,
col: usize,
rowspan: usize,
colspan: usize,
) -> Rect
pub fn span( &self, row: usize, col: usize, rowspan: usize, colspan: usize, ) -> Rect
Get the rectangle for a spanning region.
The region starts at (row, col) and spans rowspan rows and colspan columns.
Sourcepub fn area(&self, name: &str) -> Option<Rect>
pub fn area(&self, name: &str) -> Option<Rect>
Get the rectangle for a named area.
Returns None if the area name is not defined.
Sourcepub fn row_height(&self, row: usize) -> u16
pub fn row_height(&self, row: usize) -> u16
Get the height of a specific row.
Trait Implementations§
Source§impl Clone for GridLayout
impl Clone for GridLayout
Source§fn clone(&self) -> GridLayout
fn clone(&self) -> GridLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GridLayout
impl RefUnwindSafe for GridLayout
impl Send for GridLayout
impl Sync for GridLayout
impl Unpin for GridLayout
impl UnwindSafe for GridLayout
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