Expand description
§Toggly Macros
Procedural macros for Toggly feature flags.
§Feature Guard Macro
The #[feature_flag] attribute macro guards a function with a feature flag check.
ⓘ
use toggly_macros::feature_flag;
#[feature_flag("my-feature")]
async fn my_feature_function() -> String {
"Feature is enabled!".to_string()
}§Options
feature- The feature key (required)client- Expression to get the client (default: from context)context- Expression to get the evaluation context (default:Default::default())fallback- Return value when feature is disablednegate- Invert the feature check
Macros§
- feature_
gate - Macro for conditional compilation based on feature flags at runtime.
Attribute Macros§
- feature_
flag - Guard a function with a feature flag check.
Derive Macros§
- Feature
Flags - Derive macro for creating feature flag enums.