Struct cursive::Rect [−][src]
pub struct Rect { /* fields omitted */ }
Expand description
A non-empty rectangle on the 2D grid.
Implementations
Creates a new Rect
around a single point.
The size will be (1, 1)
.
Creates a new Rect
with the given position and size.
The minimum size will (1, 1)
.
Creates a new Rect
from two corners.
It can be any two opposite corners.
Grow this rectangle if necessary to include other
.
Returns a new rectangle that includes both self
and other
.
Returns the start and end coordinate of one side of this rectangle.
Both start and end are inclusive.
Returns the coordinate of the given edge.
All edges are inclusive.
Adds the given offset to this rectangle.
Returns the bottom-right corner.
This is inclusive.
Returns the bottom-left corner.
This is inclusive.
Returns the Y value of the top edge of the rectangle.
This is inclusive.
Returns the X value of the left edge of the rectangle.
This is inclusive.
Returns the X value of the right edge of the rectangle.
This is inclusive.
Returns the Y value of the botton edge of the rectangle.
This is inclusive.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Rect
impl UnwindSafe for Rect
Blanket Implementations
Mutably borrows from an owned value. Read more
Calls the given closure and return the result. Read more
Calls the given closure on self
.