pub struct CursorPos {
pub x: usize,
pub y: usize,
}Expand description
A terminal cursor position, mirroring ink’s CursorPosition
(ink/src/cursor-helpers.ts:3-6, {x, y}). x/y are 0-based cell
coordinates within the rendered frame; the napi boundary maps its u32
CursorPos onto this usize form for the escape arithmetic.
Fields§
§x: usize0-based column. buildCursorSuffix emits cursorTo(x) (1-based on the
wire — escapes::cursor_to adds the +1).
y: usize0-based row within the rendered frame’s visible lines.
Trait Implementations§
impl Copy for CursorPos
impl Eq for CursorPos
impl StructuralPartialEq for CursorPos
Auto Trait Implementations§
impl Freeze for CursorPos
impl RefUnwindSafe for CursorPos
impl Send for CursorPos
impl Sync for CursorPos
impl Unpin for CursorPos
impl UnsafeUnpin for CursorPos
impl UnwindSafe for CursorPos
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