aboutsummaryrefslogtreecommitdiff
path: root/mingling_pathf/src/patterns/dispatcher_clap.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-20 14:49:47 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-20 14:49:47 +0800
commit9f5a0f2e9325264564bc6fe9ff544c034ad16287 (patch)
tree417cfb041e0713b407b0020fbacea6dc635565b5 /mingling_pathf/src/patterns/dispatcher_clap.rs
parentde3156d0b054fc6e459e526d92df4d06ce6e6770 (diff)
chore: add missing docs lint and document public API
Add `#![deny(missing_docs)]` across multiple crates and fill in documentation for all public items, including struct fields, enum variants, trait methods, and proc macros. Also mark two shell scripts as executable.
Diffstat (limited to 'mingling_pathf/src/patterns/dispatcher_clap.rs')
-rw-r--r--mingling_pathf/src/patterns/dispatcher_clap.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/mingling_pathf/src/patterns/dispatcher_clap.rs b/mingling_pathf/src/patterns/dispatcher_clap.rs
index 1a86ad5..0a249b4 100644
--- a/mingling_pathf/src/patterns/dispatcher_clap.rs
+++ b/mingling_pathf/src/patterns/dispatcher_clap.rs
@@ -29,10 +29,16 @@ use crate::pattern_analyzer::{AnalyzeItem, AnalyzePattern};
/// - `#[dispatcher_clap("greet", CMDGreet, help = true)] struct EntryGreet { ... }`
/// - `#[dispatcher_clap("greet", CMDGreet, error = ErrorGreet, help = true)] struct EntryGreet { ... }`
pub struct DispatcherClapPattern {
+ /// Whether to include the `__internal_dispatcher_*` dispatch tree static in the analysis.
pub use_dispatch_tree: bool,
}
impl DispatcherClapPattern {
+ /// Creates a new `DispatcherClapPattern` with the given configuration.
+ ///
+ /// # Parameters
+ /// - `use_dispatch_tree`: When `true`, enables analysis of the `__internal_dispatcher_*`
+ /// static dispatch tree for each matched command.
pub fn new(use_dispatch_tree: bool) -> Self {
Self { use_dispatch_tree }
}