From 4ac7d7dc9e6abec2f3f84dd5baf8b642727f19c3 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 25 Apr 2026 23:41:36 +0800 Subject: Add help system with `#[help]` macro and `HelpRequest` trait --- mingling_core/src/asset/help.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 mingling_core/src/asset/help.rs (limited to 'mingling_core/src/asset/help.rs') 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); +} -- cgit