pub struct ExperimentalFeatures {
pub new_encoding: bool,
pub storage_domains: bool,
}
Fields§
§new_encoding: bool
§storage_domains: bool
Implementations§
Source§impl ExperimentalFeatures
impl ExperimentalFeatures
Sourcepub fn new(
manifest: &HashMap<String, bool>,
cli_experimental: &[Feature],
cli_no_experimental: &[Feature],
) -> Result<ExperimentalFeatures, Error>
pub fn new( manifest: &HashMap<String, bool>, cli_experimental: &[Feature], cli_no_experimental: &[Feature], ) -> Result<ExperimentalFeatures, Error>
Experimental features will be applied in the following order: 1 - manifest (no specific order) 2 - cli_no_experimental 3 - cli_experimental 4 - FORC_NO_EXPERIMENTAL (env var) 5 - FORC_EXPERIMENTAL (env var)
Source§impl ExperimentalFeatures
impl ExperimentalFeatures
pub fn set_enabled_by_name( &mut self, feature: &str, enabled: bool, ) -> Result<(), Error>
pub fn set_enabled(&mut self, feature: Feature, enabled: bool)
Sourcepub fn is_enabled_for_cfg(&self, cfg: &str) -> Result<bool, Error>
pub fn is_enabled_for_cfg(&self, cfg: &str) -> Result<bool, Error>
Used for testing if a #[cfg(...)]
feature is enabled.
Already prepends “experimental_” to the feature name.
pub fn with_new_encoding(self, enabled: bool) -> Self
pub fn with_storage_domains(self, enabled: bool) -> Self
Source§impl ExperimentalFeatures
impl ExperimentalFeatures
pub fn parse_from_package_manifest( &mut self, experimental: &HashMap<String, bool>, ) -> Result<(), Error>
Sourcepub fn parse_from_environment_variables(&mut self) -> Result<(), Error>
pub fn parse_from_environment_variables(&mut self) -> Result<(), Error>
Enable and disable features using comma separated feature names from environment variables “FORC_EXPERIMENTAL” and “FORC_NO_EXPERIMENTAL”.
pub fn parse_comma_separated_list( &mut self, features: impl AsRef<str>, enabled: bool, ) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for ExperimentalFeatures
impl Clone for ExperimentalFeatures
Source§fn clone(&self) -> ExperimentalFeatures
fn clone(&self) -> ExperimentalFeatures
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExperimentalFeatures
impl Debug for ExperimentalFeatures
Source§impl Default for ExperimentalFeatures
impl Default for ExperimentalFeatures
Source§impl PartialEq for ExperimentalFeatures
impl PartialEq for ExperimentalFeatures
impl Copy for ExperimentalFeatures
impl Eq for ExperimentalFeatures
impl StructuralPartialEq for ExperimentalFeatures
Auto Trait Implementations§
impl Freeze for ExperimentalFeatures
impl RefUnwindSafe for ExperimentalFeatures
impl Send for ExperimentalFeatures
impl Sync for ExperimentalFeatures
impl Unpin for ExperimentalFeatures
impl UnwindSafe for ExperimentalFeatures
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more