Skip to main content

Renderable

Trait Renderable 

Source
pub trait Renderable {
    // Required methods
    fn render(&self, area: Rect, buf: &mut Buffer);
    fn desired_height(&self, width: u16) -> u16;
}
Expand description

A view that can report its height before it is allocated a rectangle.

This is the essential boundary used by Codex’s chat surface: transcript cells, the active streaming cell, and the bottom pane are independently measurable. Keeping it here prevents the next renderer from becoming a second agent state machine.

Required Methods§

Source

fn render(&self, area: Rect, buf: &mut Buffer)

Paint this view into its already-allocated rectangle.

Source

fn desired_height(&self, width: u16) -> u16

Return the number of rows needed at width columns.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§