aboutsummaryrefslogtreecommitdiff
path: root/mingling_picker/src/picker.rs
Commit message (Collapse)AuthorAgeFilesLines
* feat(picker): add from_args and from_args_skip constructors魏曹先生11 hours1-0/+25
|
* feat(picker): remove route phantom from IntoPicker trait魏曹先生18 hours1-11/+26
| | | | | | Add `with_route` methods to `IntoPicker` and `PickerPattern` for setting the route type explicitly when needed, instead of carrying it as a generic parameter on the trait itself.
* fix: set default type parameter for `Picker` struct魏曹先生18 hours1-1/+1
| | | | Update doc examples to pass `String` instead of `&str` to `convert`
* feat(picker): add builtin bool pickable and parselib matcher framework魏曹先生19 hours1-9/+9
| | | | | | | | Add `Pickable` implementation for `bool` and the supporting `Matcher` trait with utility functions for argument matching. Expose `pickable_needed` and `matcher_needed` modules for downstream trait implementors.
* feat(picker): add early route on missing flag魏曹先生22 hours1-0/+1
| | | | | | | Introduce `or_route` and a `PickerResult` type that carries an optional route value. When a flag is absent, the closure given to `or_route` is evaluated and stored in `error_route`, allowing the caller to exit early without a default value.
* feat(picker): add Route generic parameter for error routing魏曹先生22 hours1-20/+31
|
* refactor: rename `PickerResult` to `PickerArgResult` and add new魏曹先生22 hours1-2/+5
| | | | `PickerResult` struct
* refactor(picker): delegate Picker methods to PickerArgs魏曹先生23 hours1-94/+84
|
* feat: add lifetime-bound pickable support and refine type constraints魏曹先生42 hours1-1/+1
|
* feat(picker): add default and post-processing hooks for flags魏曹先生45 hours1-0/+8
|
* feat(mingling_picker): rename FormatError to ParseError and add parse魏曹先生2 days1-0/+3
| | | | | | | | | module Remove unnecessary Pickable trait bounds on PickerResult and its From implementations. Introduce a new `parse` module with macro-generated parse stubs for up to 32 tuple types.
* feat(picker): add IntoPicker impl for &[String] and &T deref to魏曹先生2 days1-1/+22
| | | | Vec<String>
* feat(picker): add `pick` method to start and extend flag chains魏曹先生2 days1-0/+18
|
* refactor: rename PickerArguments to PickerArgs and PickerRequirement to魏曹先生2 days1-24/+24
| | | | PickerFlag
* feat(picker): add `is_empty` method and refactor `if let` chains魏曹先生3 days1-0/+17
| | | | | Refactor multiple `if let` patterns in macros to use the let-chain syntax for improved readability
* feat(picker): add core trait, types, and builder macro for argument魏曹先生3 days1-0/+232
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`.