Skip to main content

dispatch

Function dispatch 

Source
pub async fn dispatch(app: App) -> Result<(), Box<dyn Error + Send + Sync>>
Expand description

Parse argv and run the requested management subcommand against the passed-in App. The user binary’s main.rs calls this after building its App — see the module-level docs for the pattern.

The App must already be built (App::builder()...build()?) — the builder phases publish the ambient pool and model registry, which every management command reads. Passing a built App instead of an AppBuilder keeps the boot order in the user’s hands and lets them register plugins / models / databases freely before dispatching.