Struct tui::layout::Rect [−][src]
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]
impl Rect
pub fn new(x: u16, y: u16, width: u16, height: u16) -> Rect
[src]
pub fn new(x: u16, y: u16, width: u16, height: u16) -> Rect
pub fn area(self) -> u16
[src]
pub fn area(self) -> u16
pub fn left(self) -> u16
[src]
pub fn left(self) -> u16
pub fn right(self) -> u16
[src]
pub fn right(self) -> u16
pub fn top(self) -> u16
[src]
pub fn top(self) -> u16
pub fn bottom(self) -> u16
[src]
pub fn bottom(self) -> u16
pub fn inner(self, margin: u16) -> Rect
[src]
pub fn inner(self, margin: u16) -> Rect
pub fn union(self, other: Rect) -> Rect
[src]
pub fn union(self, other: Rect) -> Rect
pub fn intersection(self, other: Rect) -> Rect
[src]
pub fn intersection(self, other: Rect) -> Rect
pub fn intersects(self, other: Rect) -> bool
[src]
pub fn intersects(self, other: Rect) -> bool
Trait Implementations
impl Debug for Rect
[src]
impl Debug for Rect
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Rect
[src]
impl Clone for Rect
fn clone(&self) -> Rect
[src]
fn clone(&self) -> Rect
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Rect
[src]
impl Copy for Rect
impl Hash for Rect
[src]
impl Hash for Rect
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Rect
[src]
impl PartialEq for Rect
fn eq(&self, other: &Rect) -> bool
[src]
fn eq(&self, other: &Rect) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rect) -> bool
[src]
fn ne(&self, other: &Rect) -> bool
This method tests for !=
.
impl Eq for Rect
[src]
impl Eq for Rect
impl Default for Rect
[src]
impl Default for Rect