pub trait FeaturesModule: ContractBase + Sized {
// Required methods
fn get_feature_flag(&self, feature_name: FeatureName<'_>) -> u8;
fn set_feature_flag(&self, feature_name: FeatureName<'_>, value: u8);
// Provided methods
fn check_feature_on(&self, feature_name: &'static [u8], default: bool) { ... }
fn set_feature_flag_endpoint(
&self,
feature_name: Vec<u8>,
value: bool
) -> SCResult<()> { ... }
}
Expand description
Standard module for managing feature flags.
Required Methods§
fn get_feature_flag(&self, feature_name: FeatureName<'_>) -> u8
fn set_feature_flag(&self, feature_name: FeatureName<'_>, value: u8)
Provided Methods§
fn check_feature_on(&self, feature_name: &'static [u8], default: bool)
fn set_feature_flag_endpoint( &self, feature_name: Vec<u8>, value: bool ) -> SCResult<()>
Object Safety§
This trait is not object safe.