Skip to main content

ActionHandler

Type Alias ActionHandler 

Source
pub type ActionHandler = Arc<dyn Fn(&ActionContext<'_>) -> Option<Effect> + Send + Sync + 'static>;
Expand description

Action handler closure shape. Returns an [Effect] when the handler wants the host to apply state mutation (open a file, change selection, etc.); None for fire-and-forget handlers (logging, publishing an event).

Closures are Send + Sync so the registry can be cloned freely across threads; they take a borrowed ActionContext for zero-copy access to live state.

Aliased Typeยง

pub struct ActionHandler { /* private fields */ }