pub struct CalculatedLayout { /* private fields */ }Expand description
A helper for working with a single calculated layout.
This provides convenient methods for accessing and working with layout rects.
Implementations§
Source§impl CalculatedLayout
impl CalculatedLayout
Sourcepub fn new(rects: Vec<Vec<Rect>>) -> Self
pub fn new(rects: Vec<Vec<Rect>>) -> Self
Creates a new CalculatedLayout from calculated rects.
Sourcepub fn get(&self, row: usize, col: usize) -> Option<&Rect>
pub fn get(&self, row: usize, col: usize) -> Option<&Rect>
Gets a rect at the specified row and column.
Sourcepub fn iter(&self) -> impl Iterator<Item = (usize, usize, &Rect)>
pub fn iter(&self) -> impl Iterator<Item = (usize, usize, &Rect)>
Iterates over all rects with their row and column indices.
Auto Trait Implementations§
impl Freeze for CalculatedLayout
impl RefUnwindSafe for CalculatedLayout
impl Send for CalculatedLayout
impl Sync for CalculatedLayout
impl Unpin for CalculatedLayout
impl UnwindSafe for CalculatedLayout
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