From 501eb14dfca05813fa7a16f13f2efd9ba2b8c923 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 19 Jul 2026 00:35:09 +0800 Subject: docs: add doc comments for Picker, AsPicker, and ProgramSetup traits --- mingling/src/parser/picker.rs | 4 ++++ mingling/src/setups.rs | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'mingling') diff --git a/mingling/src/parser/picker.rs b/mingling/src/parser/picker.rs index 601cd3f..ca4561c 100644 --- a/mingling/src/parser/picker.rs +++ b/mingling/src/parser/picker.rs @@ -743,6 +743,10 @@ where } } +/// Trait for types that can be converted into a `Picker` to extract values from command-line arguments. +/// +/// This trait provides a convenient way to convert a value (such as `Vec`, `&[String]`, etc.) +/// into a `Picker` and immediately start extracting values associated with specific flags. pub trait AsPicker where Self: Into>, diff --git a/mingling/src/setups.rs b/mingling/src/setups.rs index a1290ff..6fd728a 100644 --- a/mingling/src/setups.rs +++ b/mingling/src/setups.rs @@ -7,6 +7,10 @@ pub use dirs::*; mod exit_code; pub use exit_code::*; +/// Picker's `ProgramSetup` variant. +/// +/// Internally does not use its own argument parsing, +/// but relies on `arg_picker`'s argument parsing capability. #[cfg(feature = "picker")] pub mod picker; -- cgit