Skip to main content

Handler

Type Alias Handler 

Source
pub type Handler = Arc<dyn Fn(&dyn Shell, &ArgMatches) -> Result<ExitCode, ShellError> + Send + Sync>;
Expand description

A shared closure that handles a parsed command.

Return HANDLER_SUCCESS on success, ShellError::CommandNotFound to pass control to the next handler, or another ShellError to abort.

Aliased Typeยง

pub struct Handler { /* private fields */ }