pub struct Rect {
pub x: i32,
pub y: i32,
pub width: u16,
pub height: u16,
}Expand description
The computed position and size of a node in terminal cells.
Coordinates are relative to the node’s parent (same contract as yoga’s
getComputedLeft / getComputedTop used by ink’s renderer —
render-node-to-output.ts:129-130).
x,y— signed to accommodate negative values from margins.width,height— unsigned; terminal columns/rows cannot be negative.
Fields§
§x: i32Left edge relative to parent, in terminal columns.
y: i32Top edge relative to parent, in terminal rows.
width: u16Width in terminal columns.
height: u16Height in terminal rows.
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