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§

source

fn get_feature_flag(&self, feature_name: FeatureName<'_>) -> u8

source

fn set_feature_flag(&self, feature_name: FeatureName<'_>, value: u8)

Provided Methods§

source

fn check_feature_on(&self, feature_name: &'static [u8], default: bool)

source

fn set_feature_flag_endpoint( &self, feature_name: Vec<u8>, value: bool ) -> SCResult<()>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<C> FeaturesModule for C
where C: AutoImpl,