Expand description
Standard Exit Code Catalog
Provides exit code lookups with standard names, descriptions, and categories.
§Example
use rsfulmen::foundry::exit_codes::{lookup_exit_code, ExitCategory, EXIT_SUCCESS, EXIT_FAILURE};
assert_eq!(EXIT_SUCCESS, 0);
assert_eq!(EXIT_FAILURE, 1);
let not_found = lookup_exit_code(404);
assert!(not_found.is_none()); // HTTP status != exit code
let ok = lookup_exit_code(0).unwrap();
assert_eq!(ok.name, "EXIT_SUCCESS");Structs§
- Exit
Code - Exit code entry.
Enums§
- Exit
Category - Exit code category identifier.
Constants§
- EXIT_
AUTHENTICATION_ FAILED - Authentication failed (70)
- EXIT_
CANNOT_ EXECUTE - Command found but could not be executed (126)
- EXIT_
CONFIG_ INVALID - Configuration file invalid (20)
- EXIT_
DATA_ INVALID - Data validation failed (60)
- EXIT_
FAILURE - Generic failure (1)
- EXIT_
HEALTH_ CHECK_ FAILED - Health check failed (30)
- EXIT_
INVALID_ ARGUMENT - Invalid command-line argument (40)
- EXIT_
NOT_ FOUND - Command not found (127)
- EXIT_
PERMISSION_ DENIED - Permission denied (50)
- EXIT_
PORT_ IN_ USE - Port is already in use (10)
- EXIT_
SIGNAL_ INT - SIGINT received (130)
- EXIT_
SIGNAL_ KILL - SIGKILL received (137)
- EXIT_
SIGNAL_ TERM - SIGTERM received (143)
- EXIT_
SUCCESS - Successful execution (0)
- EXIT_
TIMEOUT - Command timed out before completion (124)
- EXIT_
TIMEOUT_ INTERNAL - Timeout utility itself failed (125)
- EXIT_
USAGE - Command usage error - BSD sysexits.h compatible (64)
Functions§
- get_
exit_ name - Get the symbolic name for an exit code.
- get_
signal_ from_ exit - Get the signal number from a signal-induced exit code.
- is_
signal_ exit - Check if an exit code was caused by a signal (128+).
- is_
success - Check if an exit code indicates success (code 0).
- list_
by_ category - List all exit codes in a specific category.
- list_
exit_ codes - List all exit codes in the catalog.
- lookup_
exit_ code - Look up an exit code by its numeric value.