diff options
Diffstat (limited to 'mingling/src')
| -rw-r--r-- | mingling/src/example_docs.rs | 28 | ||||
| -rw-r--r-- | mingling/src/features.rs | 11 | ||||
| -rw-r--r-- | mingling/src/lib.rs | 32 |
3 files changed, 41 insertions, 30 deletions
diff --git a/mingling/src/example_docs.rs b/mingling/src/example_docs.rs index 3e9bd26..6f37a13 100644 --- a/mingling/src/example_docs.rs +++ b/mingling/src/example_docs.rs @@ -31,7 +31,7 @@ /// path = "../../mingling" /// /// # Enable `parser` features -/// features = ["parser", "extra_macros"] +/// features = ["parser", "extras"] /// /// [workspace] /// ``` @@ -161,7 +161,7 @@ pub mod example_argument_parse {} /// path = "../../mingling" /// /// # Enable `picker` features -/// features = ["picker", "extra_macros"] +/// features = ["picker", "extras"] /// /// [workspace] /// ``` @@ -713,7 +713,7 @@ pub mod example_clap_binding {} /// > AND `[build-dependencies]` so that pathf's builder can detect /// > `__internal_dispatcher_*` types needed by the dispatch tree. /// > -/// > Also requires `extra_macros` for the implicit `dispatcher!("hello")` form. +/// > Also requires `extras` for the implicit `dispatcher!("hello")` form. /// /// Run: /// ```bash @@ -735,7 +735,7 @@ pub mod example_clap_binding {} /// [dependencies] /// mingling = { path = "../../mingling", features = [ /// "dispatch_tree", -/// "extra_macros", +/// "extras", /// "pathf", /// ] } /// @@ -796,8 +796,8 @@ pub mod example_combine_pathf_dispatch_tree {} /// [dependencies.mingling] /// path = "../../mingling" /// features = [ -/// # Use `extra_macros` to introduce the `#[command]` macro -/// "extra_macros", +/// # Use `extras` to introduce the `#[command]` macro +/// "extras", /// /// # Use `picker` to parse arguments /// "picker", @@ -1052,7 +1052,7 @@ pub mod example_completion {} /// [dependencies.mingling] /// path = "../../mingling" /// -/// features = ["parser", "extra_macros"] +/// features = ["parser", "extras"] /// /// [workspace] /// ``` @@ -1780,7 +1780,7 @@ pub mod example_help {} pub mod example_hook {} /// Example Implicit Dispatcher /// -/// > This example demonstrates how to use the implicit `dispatcher!` definition syntax enabled by `extra_macros` +/// > This example demonstrates how to use the implicit `dispatcher!` definition syntax enabled by `extras` /// /// Source code (./Cargo.toml) /// ```toml @@ -1791,7 +1791,7 @@ pub mod example_hook {} /// /// [dependencies.mingling] /// path = "../../mingling" -/// features = ["extra_macros"] +/// features = ["extras"] /// /// [workspace] /// ``` @@ -1965,7 +1965,7 @@ pub mod example_lazy_resources {} /// [dependencies.mingling] /// path = "../../mingling" /// features = [ -/// "extra_macros", +/// "extras", /// ] /// /// [workspace] @@ -2096,7 +2096,7 @@ pub mod example_outside_type {} /// path = "../../mingling" /// features = [ /// "structural_renderer", -/// "extra_macros", +/// "extras", /// ] /// /// [workspace] @@ -2399,7 +2399,7 @@ pub mod example_pathfinder {} /// /// [dependencies.mingling] /// path = "../../mingling" -/// features = ["repl", "parser", "extra_macros"] +/// features = ["repl", "parser", "extras"] /// /// [dependencies] /// just_fmt = "0.1.2" @@ -2691,7 +2691,7 @@ pub mod example_resources {} /// edition = "2024" /// /// [dependencies] -/// mingling = { path = "../../mingling", features = ["extra_macros"] } +/// mingling = { path = "../../mingling", features = ["extras"] } /// /// [workspace] /// ``` @@ -2843,7 +2843,7 @@ pub mod example_structural_renderer {} /// edition = "2024" /// /// [dependencies] -/// mingling = { path = "../../mingling", features = ["extra_macros"] } +/// mingling = { path = "../../mingling", features = ["extras"] } /// /// [workspace] /// ``` diff --git a/mingling/src/features.rs b/mingling/src/features.rs index 0dde333..d1fcbd2 100644 --- a/mingling/src/features.rs +++ b/mingling/src/features.rs @@ -130,6 +130,17 @@ pub const MINGLING_EXTRA_MACROS: bool = false; #[cfg(feature = "extra_macros")] #[allow(unused)] pub const MINGLING_EXTRA_MACROS: bool = true; +/// Whether the `extras` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "extras"))] +#[allow(unused)] +pub const MINGLING_EXTRAS: bool = false; + +/// Whether the `extras` feature is enabled +/// Current: `enabled` +#[cfg(feature = "extras")] +#[allow(unused)] +pub const MINGLING_EXTRAS: bool = true; /// Whether the `json_serde_fmt` feature is enabled /// Current: `disabled` #[cfg(not(feature = "json_serde_fmt"))] diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs index 3852191..6c1378c 100644 --- a/mingling/src/lib.rs +++ b/mingling/src/lib.rs @@ -53,29 +53,29 @@ pub mod macros { pub use arg_picker::macros::*; pub use mingling_macros::buffer; pub use mingling_macros::chain; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::command; #[cfg(feature = "comp")] pub use mingling_macros::completion; pub use mingling_macros::dispatcher; #[cfg(feature = "clap")] pub use mingling_macros::dispatcher_clap; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::empty_result; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::entry; pub use mingling_macros::gen_program; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::group; - #[cfg(all(feature = "structural_renderer", feature = "extra_macros"))] + #[cfg(all(feature = "structural_renderer", feature = "extras"))] pub use mingling_macros::group_structural; pub use mingling_macros::help; pub use mingling_macros::mlint; pub use mingling_macros::node; pub use mingling_macros::pack; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::pack_err; - #[cfg(all(feature = "structural_renderer", feature = "extra_macros"))] + #[cfg(all(feature = "structural_renderer", feature = "extras"))] pub use mingling_macros::pack_err_structural; #[cfg(feature = "structural_renderer")] pub use mingling_macros::pack_structural; @@ -86,7 +86,7 @@ pub mod macros { pub use mingling_macros::program_fallback_gen; #[doc(hidden)] pub use mingling_macros::program_final_gen; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::program_setup; pub use mingling_macros::r_append; pub use mingling_macros::r_eprint; @@ -103,14 +103,14 @@ pub mod macros { pub use mingling_macros::register_renderer; #[doc(hidden)] pub use mingling_macros::register_type; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::render_route; pub use mingling_macros::renderer; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::renderify; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::route; - #[cfg(feature = "extra_macros")] + #[cfg(feature = "extras")] pub use mingling_macros::routeify; #[cfg(feature = "comp")] pub use mingling_macros::suggest; @@ -181,24 +181,24 @@ pub mod prelude { pub use crate::Routable; #[cfg(feature = "macros")] pub use crate::macros::chain; - #[cfg(all(feature = "extra_macros", feature = "macros"))] + #[cfg(all(feature = "extras", feature = "macros"))] pub use crate::macros::command; #[cfg(feature = "macros")] pub use crate::macros::dispatcher; - #[cfg(all(feature = "extra_macros", feature = "macros"))] + #[cfg(all(feature = "extras", feature = "macros"))] pub use crate::macros::empty_result; #[cfg(feature = "macros")] pub use crate::macros::gen_program; #[cfg(feature = "macros")] pub use crate::macros::pack; - #[cfg(all(feature = "extra_macros", feature = "macros"))] + #[cfg(all(feature = "extras", feature = "macros"))] pub use crate::macros::pack_err; #[cfg(feature = "macros")] pub use crate::macros::renderer; #[cfg(all( feature = "macros", feature = "structural_renderer", - feature = "extra_macros" + feature = "extras" ))] pub use mingling_macros::pack_err_structural; #[cfg(all(feature = "macros", feature = "structural_renderer"))] |
