Struct tui::layout::Rect
[−]
[src]
pub struct Rect { pub x: u16, pub y: u16, pub width: u16, pub height: u16, }
A simple rectangle used in the computation of the layout and to give widgets an hint about the area they are supposed to render to.
Fields
x: u16
y: u16
width: u16
height: u16
Methods
impl Rect
[src]
fn new(x: u16, y: u16, width: u16, height: u16) -> Rect
fn area(&self) -> u16
fn left(&self) -> u16
fn right(&self) -> u16
fn top(&self) -> u16
fn bottom(&self) -> u16
fn inner(&self, margin: u16) -> Rect
fn union(&self, other: &Rect) -> Rect
fn intersection(&self, other: &Rect) -> Rect
fn intersects(&self, other: &Rect) -> bool
Trait Implementations
impl Debug for Rect
[src]
impl Clone for Rect
[src]
fn clone(&self) -> Rect
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Rect
[src]
impl Hash for Rect
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl PartialEq for Rect
[src]
fn eq(&self, __arg_0: &Rect) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rect) -> bool
This method tests for !=
.