pub struct Area {
pub left: u16,
pub top: u16,
pub width: u16,
pub height: u16,
}
Expand description
A rectangular part of the screen
Fields§
§left: u16
§top: u16
§width: u16
§height: u16
Implementations§
source§impl Area
impl Area
sourcepub const fn uninitialized() -> Area
pub const fn uninitialized() -> Area
build a new area. You’ll need to set the position and size before you can use it
sourcepub fn full_screen() -> Area
pub fn full_screen() -> Area
build an area covering the whole terminal
pub const fn right(&self) -> u16
pub const fn bottom(&self) -> u16
sourcepub const fn contains(&self, x: u16, y: u16) -> bool
pub const fn contains(&self, x: u16, y: u16) -> bool
tell whether the char at (x,y) is in the area
sourcepub fn pad_for_max_width(&mut self, max_width: u16)
pub fn pad_for_max_width(&mut self, max_width: u16)
symmetrically shrink the area if its width is bigger than max_width
Trait Implementations§
source§impl PartialEq for Area
impl PartialEq for Area
impl Eq for Area
impl StructuralPartialEq for Area
Auto Trait Implementations§
impl Freeze for Area
impl RefUnwindSafe for Area
impl Send for Area
impl Sync for Area
impl Unpin for Area
impl UnwindSafe for Area
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