aboutsummaryrefslogtreecommitdiff
path: root/mingling_core/src/asset
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-04-25 23:41:36 +0800
committer魏曹先生 <1992414357@qq.com>2026-04-25 23:41:36 +0800
commit4ac7d7dc9e6abec2f3f84dd5baf8b642727f19c3 (patch)
treea36a182869f035e52ec7f6b7e64826d90869f438 /mingling_core/src/asset
parent7625655d474f6f12e04a11a067f87287badce9f2 (diff)
Add help system with `#[help]` macro and `HelpRequest` trait
Diffstat (limited to 'mingling_core/src/asset')
-rw-r--r--mingling_core/src/asset/help.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/mingling_core/src/asset/help.rs b/mingling_core/src/asset/help.rs
new file mode 100644
index 0000000..ff2b3d4
--- /dev/null
+++ b/mingling_core/src/asset/help.rs
@@ -0,0 +1,10 @@
+use crate::RenderResult;
+
+/// Handles help rendering for command-line arguments
+pub trait HelpRequest {
+ /// The entry type
+ type Entry;
+
+ /// Process the previous value and write the result into the provided [`RenderResult`](./struct.RenderResult.html)
+ fn render_help(p: Self::Entry, r: &mut RenderResult);
+}