//! # 🎚 Feature toggle API
//!
//! This API lets you read feature toggles defined in the module's `Cargo.toml`.
//!
//! Example:
//!
//! ```rust,no_run
//! require_feature_toggle!()
//!
//! feature_toggle(); // TODO fill
//! ```
use crate::ffi::feature_toggle_v0 as ffi;
#[doc(hidden)]
pub use ffi::API as FFI_API;
/// Reads the value for a feature toggle predefined in the package's metadata.
///
/// Panics if the feature toggle identifier hasn't been predeclared in the module's `Cargo.toml`.
pub fn get(id: &'static str) -> bool {
ffi::get_feature_toggle(id) == ffi::FeatureToggleValue::Enabled
}