Expand description
Helper clap functions to localize error handling and options
This module provides utilities for handling clap errors with localization support. It uses clap’s error context API to extract structured information from errors instead of parsing error strings, providing a more robust solution.
Structs§
- Error
Formatter - Unified error formatter that handles all error types consistently
Enums§
- Color
- Color enum for consistent styling
Functions§
- configure_
localized_ command - Configures a clap
Commandwith proper localization and color settings. - handle_
clap_ error_ with_ exit_ code - Handles a clap error directly with a custom exit code.
- handle_
clap_ result - Handles clap command parsing results with proper localization support.
- handle_
clap_ result_ with_ exit_ code - Handles clap command parsing with a custom exit code for errors.