Skip to main content

apply

Function apply 

Source
pub fn apply(app: &mut ReplApp, ev: ReplEvent)
Expand description

Apply one ReplEvent to app, mutating it in place.

Why: a free function (rather than an ReplApp method) so it matches crate::run::event_loop’s apply: impl FnMut(&mut M, ReplEvent) shape exactly — a caller passes trusty_code_tui::app::apply directly as that argument. What: dispatches on every ReplEvent variant (see the module doc comment for what’s out of scope). Key events are further dispatched by [apply_key]. Test: tests below cover every variant this function actually changes state for.