Skip to main content

dispatch

Function dispatch 

Source
pub fn dispatch(
    command: &Commands,
    format: OutputFormat,
) -> Result<(), Box<dyn Error>>
Expand description

Run one already-parsed command.

Split out from run so a caller that did its own parsing – apr zram – executes the identical code path instead of a copy of it. Returns the error rather than an exit code so each front end can report it in its own idiom.

§Errors

Propagates whatever the selected command returns.