pub fn run<B: Backend>(
terminal: &mut Terminal<B>,
app: &mut ListApp,
rx: Receiver<(usize, String)>,
) -> Result<(), B::Error>Expand description
Drive the Inline Viewport render loop, consuming (row_index, status)
updates from rx until all rows are filled or the sender disconnects.
The caller is responsible for spawning the producer (typically a
rayon par_iter inside a std::thread::scope that iterates worktrees
in parallel and sends results) and for drawing the initial skeleton frame
before calling run (e.g. terminal.draw(|f| app.render(f))). run
draws the skeleton itself on its first iteration for backward-compat with
test callers that do not pre-draw; the duplicate draw is harmless.
On return, app.rows contains final statuses. The viewport exits via
drop(terminal) which leaves the final frame in the scrollback.
Returns Result<(), B::Error>. For CrosstermBackend, B::Error = io::Error,
and display.rs converts it to crate::error::Result via the #[from] impl on
CwError::Io. For TestBackend, B::Error = Infallible, and tests use
.expect(...) to unwrap.