From 4665fc94ab9508d115298dd988e2381354f46c01 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 14 Jul 2026 01:36:27 +0800 Subject: feat(picker): add core trait, types, and builder macro for argument parsing Implement the foundational `mingling_picker` library along with its companion `mingling_picker_macros` crate. The picker provides: - `Pickable` trait for parsing types from raw strings - `PickerResult` enum modeling parse outcomes - `Picker` struct for storing and indexing command-line arguments - `PickerRequirement` struct for declarative parameter definitions - `PickerPattern` family (1..32) of typed pattern structs via the `internal_repeat` proc macro - `req!` proc macro as a succinct builder for `PickerRequirement` Re-export `mingling_picker::macros::*` from the `mingling` crate when the `picker` feature is enabled, replacing the previous wildcard re-export of `mingling_macros`. --- mingling_picker/src/lib.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'mingling_picker/src/lib.rs') diff --git a/mingling_picker/src/lib.rs b/mingling_picker/src/lib.rs index 3c3251d..97020a4 100644 --- a/mingling_picker/src/lib.rs +++ b/mingling_picker/src/lib.rs @@ -1 +1,19 @@ -pub mod prelude {} +mod picker; +pub use picker::*; + +mod pickable; +pub use pickable::*; + +mod requirement; +pub use requirement::*; + +mod result; +pub use result::*; + +pub mod prelude { + pub use crate::IntoPicker; +} + +pub mod macros { + pub use mingling_picker_macros::*; +} -- cgit