Skip to main content

Module verify

Module verify 

Source
Expand description

Handler-Command verification for detecting mismatches between #[handler] function signatures and clap Command definitions.

This module provides types and functions to verify that a handler’s expected arguments match what the clap Command actually defines, producing clear error messages when they don’t.

§Example

use standout_dispatch::verify::{ExpectedArg, verify_handler_args};

// Handler expects these args (generated by #[handler] macro)
let expected = vec![
    ExpectedArg::flag("verbose", "verbose"),
    ExpectedArg::optional_arg("filter", "filter"),
];

// Verify against the clap Command
verify_handler_args(&command, "my_handler", &expected)?;

Structs§

ExpectedArg
What a handler expects for a single parameter.
HandlerMismatchError
Error when handler expectations don’t match command definition.

Enums§

ArgKind
Describes what kind of argument a handler expects.
ArgMismatch
A single mismatch between handler expectation and command definition.

Functions§

verify_handler_args
Verify that a handler’s expected arguments match a clap Command’s definition.