Skip to main content

Crate use_exit_code

Crate use_exit_code 

Source
Expand description

§use-exit-code

Portable exit status primitives for RustUse CLI-adjacent code.

use-exit-code keeps common process exit meanings explicit while staying small and platform-aware.

§Example

use use_exit_code::{CONFIG_ERROR, ExitCode, SUCCESS};

let success = ExitCode::from_u8(0);

assert_eq!(success, SUCCESS);
assert_eq!(CONFIG_ERROR.as_i32(), 78);

§Scope

This crate does not spawn processes, inspect child status values, or manage application shutdown.

Modules§

prelude
Commonly used exit code primitives.

Structs§

ExitCode
A portable process exit code primitive.

Enums§

ExitCodeError
Exit code conversion errors.

Constants§

CONFIG_ERROR
Configuration error.
FAILURE
General failure.
PERMISSION_DENIED
Permission denied.
SUCCESS
Successful completion.
UNAVAILABLE
Service or dependency unavailable.
USAGE_ERROR
Command line usage error.