diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-08-03 00:27:31 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-08-03 00:28:29 +0800 |
| commit | 3668b49c0d3423f1d5d10bb6b4a0e0e7b61f2046 (patch) | |
| tree | b006a40678f68c3d9c53a9035ca251596701ecef /mingling/src | |
| parent | eaf1ce9fa63e364774a4685b777cacdbb4f63df6 (diff) | |
docs: Add preset feature groups and improve feature docs
Add convenience presets (`mini`, `advanced`, `full`, `build_advanced`,
`build_full`) to `mingling/Cargo.toml` and document them in both
English and Chinese feature docs. Update getting-started guides to
reflect the new default `core`/`macros` features.
Diffstat (limited to 'mingling/src')
| -rw-r--r-- | mingling/src/features.rs | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mingling/src/features.rs b/mingling/src/features.rs index d1fcbd2..2925f03 100644 --- a/mingling/src/features.rs +++ b/mingling/src/features.rs @@ -1,3 +1,14 @@ +/// Whether the `advanced` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "advanced"))] +#[allow(unused)] +pub const MINGLING_ADVANCED: bool = false; + +/// Whether the `advanced` feature is enabled +/// Current: `enabled` +#[cfg(feature = "advanced")] +#[allow(unused)] +pub const MINGLING_ADVANCED: bool = true; /// Whether the `all_serde_fmt` feature is enabled /// Current: `disabled` #[cfg(not(feature = "all_serde_fmt"))] @@ -31,6 +42,28 @@ pub const MINGLING_BUILD: bool = false; #[cfg(feature = "build")] #[allow(unused)] pub const MINGLING_BUILD: bool = true; +/// Whether the `build_advanced` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "build_advanced"))] +#[allow(unused)] +pub const MINGLING_BUILD_ADVANCED: bool = false; + +/// Whether the `build_advanced` feature is enabled +/// Current: `enabled` +#[cfg(feature = "build_advanced")] +#[allow(unused)] +pub const MINGLING_BUILD_ADVANCED: bool = true; +/// Whether the `build_full` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "build_full"))] +#[allow(unused)] +pub const MINGLING_BUILD_FULL: bool = false; + +/// Whether the `build_full` feature is enabled +/// Current: `enabled` +#[cfg(feature = "build_full")] +#[allow(unused)] +pub const MINGLING_BUILD_FULL: bool = true; /// Whether the `builds` feature is enabled /// Current: `disabled` #[cfg(not(feature = "builds"))] @@ -141,6 +174,17 @@ pub const MINGLING_EXTRAS: bool = false; #[cfg(feature = "extras")] #[allow(unused)] pub const MINGLING_EXTRAS: bool = true; +/// Whether the `full` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "full"))] +#[allow(unused)] +pub const MINGLING_FULL: bool = false; + +/// Whether the `full` feature is enabled +/// Current: `enabled` +#[cfg(feature = "full")] +#[allow(unused)] +pub const MINGLING_FULL: bool = true; /// Whether the `json_serde_fmt` feature is enabled /// Current: `disabled` #[cfg(not(feature = "json_serde_fmt"))] @@ -163,6 +207,17 @@ pub const MINGLING_MACROS: bool = false; #[cfg(feature = "macros")] #[allow(unused)] pub const MINGLING_MACROS: bool = true; +/// Whether the `mini` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "mini"))] +#[allow(unused)] +pub const MINGLING_MINI: bool = false; + +/// Whether the `mini` feature is enabled +/// Current: `enabled` +#[cfg(feature = "mini")] +#[allow(unused)] +pub const MINGLING_MINI: bool = true; /// Whether the `nightly` feature is enabled /// Current: `disabled` #[cfg(not(feature = "nightly"))] |
