Skip to main content

cli_handle_version_or_help_or_continue

Function cli_handle_version_or_help_or_continue 

Source
pub fn cli_handle_version_or_help_or_continue(
    raw_args: &[String],
    cmd: &Command,
    config: &HelpConfig,
    name: &str,
    display_name: Option<&str>,
    version: &str,
    build: Option<&str>,
) -> Result<Option<String>, Value>
Expand description

Handle a top-level version or help request through one early entry point.

This is the preferred CLI entry point when both helpers are enabled. The caller supplies name, display_name, version, and build for the version branch. Help is derived from cmd and intentionally does not repeat version values. Version takes precedence when both flags are present, matching the traditional two-call sequence.

Requires the cli-help feature.