aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/lib.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-05-24 16:46:45 +0800
committer魏曹先生 <1992414357@qq.com>2026-05-24 16:46:45 +0800
commit11adad7db1b6202d5366527902c3f0a9fb90654f (patch)
tree76ecde96bf98686dfa2d5e9fb00f280794757363 /mingling/src/lib.rs
parent13699cfdccc901c2a7d53270f695384134ba2221 (diff)
Move entry, route, and program_setup macros to extra_macros feature
Remove these macros from the prelude and gate them behind the `extra_macros` feature flag. Update examples and documentation to enable the new feature where these macros are used.
Diffstat (limited to 'mingling/src/lib.rs')
-rw-r--r--mingling/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs
index 583c89a..a7d6896 100644
--- a/mingling/src/lib.rs
+++ b/mingling/src/lib.rs
@@ -86,6 +86,7 @@ pub mod macros {
/// Used to create an empty result value for early return from a chain function
pub use mingling_macros::empty_result;
/// Creates a packed entry value from a list of string literals
+ #[cfg(feature = "extra_macros")]
pub use mingling_macros::entry;
/// Used to collect data and create a command-line context
pub use mingling_macros::gen_program;
@@ -103,6 +104,7 @@ pub mod macros {
/// Internal macro for 'gen_program' used to finally generate the program
pub use mingling_macros::program_final_gen;
/// Used to generate program setup
+ #[cfg(feature = "extra_macros")]
pub use mingling_macros::program_setup;
/// Used to print content within a `Renderer` context
pub use mingling_macros::r_print;
@@ -121,6 +123,7 @@ pub mod macros {
/// Used to generate a struct implementing the `Renderer` trait via a method
pub use mingling_macros::renderer;
/// Used to generate a route that either returns a successful result or early returns an error.
+ #[cfg(feature = "extra_macros")]
pub use mingling_macros::route;
#[cfg(feature = "comp")]
/// Used to generate suggestions
@@ -218,8 +221,6 @@ pub mod prelude {
pub use crate::macros::dispatcher;
/// Re-export of the `empty_result` macro for creating an empty result value for early return.
pub use crate::macros::empty_result;
- /// Re-export of the `entry` macro for creating packed entry values from string literals.
- pub use crate::macros::entry;
/// Re-export of the `gen_program` macro for generating the program entry point.
pub use crate::macros::gen_program;
/// Re-export of the `pack` macro for creating wrapper types.