pub struct Rect { /* private fields */ }Expand description
A rectangular region in terminal cell coordinates.
Implementations§
Source§impl Rect
impl Rect
Sourcepub const fn new(origin: Position, size: TerminalSize) -> Self
pub const fn new(origin: Position, size: TerminalSize) -> Self
Creates a rectangle from its origin and size.
Sourcepub const fn from_size(size: TerminalSize) -> Self
pub const fn from_size(size: TerminalSize) -> Self
Creates a rectangle at the terminal origin.
Sourcepub const fn size(self) -> TerminalSize
pub const fn size(self) -> TerminalSize
Returns the rectangle’s cell dimensions.
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