Skip to main content

Module render

Module render 

Source
Expand description

Pure view: fn render(&State, &mut RenderCache, &mut Frame).

Three contracts:

  1. Never mutates State. The view is fully derived.
  2. Never performs I/O. All state — model lists, MCP status, file contents — is whatever the reducer put in State.
  3. Never holds a &mut App / &mut anything other than the Frame ratatui owns and the render-layer RenderCache (which is memoization + scroll-position bookkeeping, not reducer state).

Signature: fn render(&State, &mut RenderCache, &mut Frame). The &mut RenderCache is memoization only (markdown parse cache, scroll position, theme choice) — it never affects reducer outcomes or persisted state.

Modules§

markdown
theme
widgets
Stateless TUI widgets.
wrap
Text wrapping: plain and styled, with hard-break fallback for tokens that cannot fit.

Structs§

RenderCache
Transient render-layer state that lives across frames but isn’t reducer state. Owned by app::run_interactive; passed as &mut to render() per frame.

Functions§

render
The entrypoint. Call once per render pass from the main loop.