#[non_exhaustive]pub struct LayoutRect {
pub x: u16,
pub y: u16,
pub w: u16,
pub h: u16,
}Expand description
Renderer-agnostic rectangle used by the layout tree.
TUI hosts convert ratatui::layout::Rect at the boundary; GUI hosts convert
from their floating-point coordinate space. All fields are u16 which matches
ratatui’s field types directly and is sufficient for terminal geometry (max
65535 columns/rows).
#[non_exhaustive] — additional fields may be added in minor releases.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.x: u16Column offset from the top-left corner of the terminal/window.
y: u16Row offset from the top-left corner of the terminal/window.
w: u16Width in columns.
h: u16Height in rows.
Implementations§
Source§impl LayoutRect
impl LayoutRect
Trait Implementations§
Source§impl Clone for LayoutRect
impl Clone for LayoutRect
Source§fn clone(&self) -> LayoutRect
fn clone(&self) -> LayoutRect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LayoutRect
Source§impl Debug for LayoutRect
impl Debug for LayoutRect
Source§impl Default for LayoutRect
impl Default for LayoutRect
Source§fn default() -> LayoutRect
fn default() -> LayoutRect
Returns the “default value” for a type. Read more
impl Eq for LayoutRect
Source§impl PartialEq for LayoutRect
impl PartialEq for LayoutRect
impl StructuralPartialEq for LayoutRect
Auto Trait Implementations§
impl Freeze for LayoutRect
impl RefUnwindSafe for LayoutRect
impl Send for LayoutRect
impl Sync for LayoutRect
impl Unpin for LayoutRect
impl UnsafeUnpin for LayoutRect
impl UnwindSafe for LayoutRect
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