pub struct Screen { /* private fields */ }Expand description
The diff renderer - maintains previous frame and emits minimal ANSI updates.
Implementations§
Source§impl Screen
impl Screen
pub fn new() -> Self
Sourcepub fn prev_viewport_top(&self) -> usize
pub fn prev_viewport_top(&self) -> usize
Viewport top position (first visible line in terminal)
Sourcepub fn hardware_cursor_row(&self) -> usize
pub fn hardware_cursor_row(&self) -> usize
The current hardware cursor row tracking.
Sourcepub fn set_hardware_cursor_row(&mut self, row: usize)
pub fn set_hardware_cursor_row(&mut self, row: usize)
Update the hardware cursor row after TUI repositions the cursor. This keeps Screen’s delta calculations in sync with the actual cursor position.
pub fn prev_width(&self) -> usize
pub fn prev_height(&self) -> usize
pub fn full_redraw_count(&self) -> usize
Sourcepub fn total_lines(&self) -> usize
pub fn total_lines(&self) -> usize
Total number of lines in the last rendered frame.
Sourcepub fn finalize(&mut self, writer: &mut dyn Write) -> Result<()>
pub fn finalize(&mut self, writer: &mut dyn Write) -> Result<()>
Move cursor to one line past all rendered content (for clean program exit).
Writes the ANSI cursor-positioning sequences and \r\n so that subsequent
shell output appears on a fresh line after all TUI content.
pub fn set_clear_on_shrink(&mut self, enabled: bool)
Sourcepub fn set_use_sync_output(&mut self, enabled: bool)
pub fn set_use_sync_output(&mut self, enabled: bool)
Enable or disable synchronized output markers (\x1b[?2026h / \x1b[?2026l). Enabled by default (matching pi’s always-on approach).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Screen
impl RefUnwindSafe for Screen
impl Send for Screen
impl Sync for Screen
impl Unpin for Screen
impl UnsafeUnpin for Screen
impl UnwindSafe for Screen
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