aboutsummaryrefslogtreecommitdiff
path: root/arg_picker
diff options
context:
space:
mode:
Diffstat (limited to 'arg_picker')
-rw-r--r--arg_picker/Cargo.toml3
-rw-r--r--arg_picker/src/constants.rs16
-rw-r--r--arg_picker/src/lib.rs10
3 files changed, 29 insertions, 0 deletions
diff --git a/arg_picker/Cargo.toml b/arg_picker/Cargo.toml
index 913719e..d87a844 100644
--- a/arg_picker/Cargo.toml
+++ b/arg_picker/Cargo.toml
@@ -8,6 +8,9 @@ authors = ["Weicao-CatilGrass"]
readme = "README.md"
description = "A lightweight, type-safe CLI argument parser"
+[features]
+mingling_support = ["arg-picker-macros/mingling_support"]
+
[dependencies]
arg-picker-macros.workspace = true
just_fmt.workspace = true
diff --git a/arg_picker/src/constants.rs b/arg_picker/src/constants.rs
new file mode 100644
index 0000000..39250f8
--- /dev/null
+++ b/arg_picker/src/constants.rs
@@ -0,0 +1,16 @@
+use std::marker::PhantomData;
+
+use crate::{PickerArg, PickerArgs};
+
+/// Remaining positional arguments (anything not consumed as an option).
+/// - `full`: `[]` (empty — not triggered by any `--` prefix).
+/// - `short`: (none)
+/// - `positional`: `false` (this is a meta‑argument that collects everything left).
+/// This constant is used internally to access any leftover arguments after
+/// all defined flags/options have been processed.
+pub const REMAINS: PickerArg<PickerArgs> = PickerArg::<PickerArgs> {
+ full: &[],
+ short: None,
+ positional: false,
+ internal_type: PhantomData,
+};
diff --git a/arg_picker/src/lib.rs b/arg_picker/src/lib.rs
index c65e793..285cd16 100644
--- a/arg_picker/src/lib.rs
+++ b/arg_picker/src/lib.rs
@@ -48,3 +48,13 @@ pub mod matcher_needed {
pub use crate::PickerArgInfo;
pub use crate::parselib::{MaskedArg, Matcher, ParserStyle};
}
+
+mod constants;
+
+/// Re-export of constants used by `arg-picker`.
+///
+/// This module provides access to various constants defined internally, such as
+/// default values, configuration limits, and other static parameters.
+pub mod consts {
+ pub use crate::constants::*;
+}