aboutsummaryrefslogtreecommitdiff
path: root/mingling/src
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-05-16 16:36:54 +0800
committer魏曹先生 <1992414357@qq.com>2026-05-16 16:36:54 +0800
commit29121d32fad7760071644fe84e7c3251a19c7cde (patch)
tree5ab4150dd82191e4de0762e2657b749b488c55b0 /mingling/src
parent75f022be00bd1a3e0e43849888a4e06aebabc851 (diff)
Add doc comment for ExitCode struct usage
Diffstat (limited to 'mingling/src')
-rw-r--r--mingling/src/res/exit_code.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/mingling/src/res/exit_code.rs b/mingling/src/res/exit_code.rs
index f4d4238..b483139 100644
--- a/mingling/src/res/exit_code.rs
+++ b/mingling/src/res/exit_code.rs
@@ -1,6 +1,13 @@
use mingling_core::{ProgramCollect, this};
/// Represents a program exit code.
+///
+/// This struct should be used together with `ExitCodeSetup`:
+/// ```ignore
+/// program.with_setup(ExitCodeSetup::default());
+/// ```
+/// The exit code is stored globally per `ProgramCollect` type and can be
+/// retrieved via [`exit_code()`] or updated via [`update_exit_code()`].
#[derive(Debug, Default, Clone, Copy)]
pub struct ExitCode {
/// The numeric exit code value.