Skip to main content

FrameSink

Trait FrameSink 

Source
pub trait FrameSink {
    // Required method
    fn render(&mut self, state: &TuiState, cursor_byte: usize) -> Result<()>;

    // Provided methods
    fn insert_history_cells(&mut self, _cells: &[CellNode]) -> Result<()> { ... }
    fn replace_history_cells(&mut self, _cells: &[CellNode]) -> Result<()> { ... }
}
Expand description

Synchronous frame boundary injected into the asynchronous application loop.

Required Methods§

Source

fn render(&mut self, state: &TuiState, cursor_byte: usize) -> Result<()>

Renders the current pure state projection and editor cursor.

§Errors

Returns a terminal output failure.

Provided Methods§

Source

fn insert_history_cells(&mut self, _cells: &[CellNode]) -> Result<()>

Queues finalized cells for one-time insertion into native terminal scrollback.

§Errors

Returns a terminal output failure.

Source

fn replace_history_cells(&mut self, _cells: &[CellNode]) -> Result<()>

Replaces source-backed history before a resize or canonical rebuild replay.

§Errors

Returns a terminal output failure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§