pub struct Layout {
pub regions: Vec<Region>,
pub terminal_size: (u16, u16),
/* private fields */
}Expand description
Pre-computed layout with static regions.
Fields§
§regions: Vec<Region>Flat list of regions (no tree).
terminal_size: (u16, u16)Terminal size.
Implementations§
Source§impl Layout
impl Layout
Sourcepub const fn new(width: u16, height: u16) -> Self
pub const fn new(width: u16, height: u16) -> Self
Create a new layout for the given terminal size.
Sourcepub fn add_region(&mut self, region: Region)
pub fn add_region(&mut self, region: Region)
Add a region to the layout.
Sourcepub fn dirty_regions(&self) -> impl Iterator<Item = &Region>
pub fn dirty_regions(&self) -> impl Iterator<Item = &Region>
Get all dirty regions.
Sourcepub fn clear_dirty(&mut self)
pub fn clear_dirty(&mut self)
Clear all dirty flags.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
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