pub struct Rect {
pub x: u16,
pub y: u16,
pub width: u16,
pub height: u16,
}Expand description
A rectangle in terminal cells.
Fields§
§x: u16§y: u16§width: u16§height: u16Implementations§
Source§impl Rect
impl Rect
pub fn new(x: u16, y: u16, width: u16, height: u16) -> Self
pub fn right(self) -> u16
pub fn bottom(self) -> u16
pub fn is_empty(self) -> bool
Sourcepub fn overlaps_across(self, other: Rect, axis: Axis) -> bool
pub fn overlaps_across(self, other: Rect, axis: Axis) -> bool
Whether the two overlap on the axis perpendicular to axis.
This is what makes <C-w>l land somewhere sensible: of the windows to the right,
the ones worth considering are those that share some rows with this one.
Trait Implementations§
impl Copy for Rect
impl Eq for Rect
impl StructuralPartialEq for Rect
Auto Trait Implementations§
impl Freeze for Rect
impl RefUnwindSafe for Rect
impl Send for Rect
impl Sync for Rect
impl Unpin for Rect
impl UnsafeUnpin for Rect
impl UnwindSafe for Rect
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