Skip to main content

PreDispatchFn

Type Alias PreDispatchFn 

Source
pub type PreDispatchFn = Arc<dyn Fn(&ArgMatches, &mut CommandContext) -> Result<(), HookError> + Send + Sync>;
Expand description

Type alias for pre-dispatch hook functions.

Pre-dispatch hooks receive mutable access to CommandContext, allowing them to inject state into ctx.extensions that handlers can retrieve.

Aliased Typeยง

pub struct PreDispatchFn { /* private fields */ }