Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::ExperimentalFeatureSettings Struct Reference
Inheritance diagram for nix::ExperimentalFeatureSettings:
nix::Config nix::AbstractConfig

Public Member Functions

bool isEnabled (const ExperimentalFeature &) const
 
void require (const ExperimentalFeature &) const
 
bool isEnabled (const std::optional< ExperimentalFeature > &) const
 
void require (const std::optional< ExperimentalFeature > &) const
 
- Public Member Functions inherited from nix::Config
 Config (StringMap initials={})
 
bool set (const std::string &name, const std::string &value) override
 
void addSetting (AbstractSetting *setting)
 
void getSettings (std::map< std::string, SettingInfo > &res, bool overriddenOnly=false) override
 
void resetOverridden () override
 
nlohmann::json toJSON () override
 
std::string toKeyValue () override
 
void convertToArgs (Args &args, const std::string &category) override
 
- Public Member Functions inherited from nix::AbstractConfig
void applyConfig (const std::string &contents, const std::string &path="<unknown>")
 
void warnUnknownSettings ()
 
void reapplyUnknownSettings ()
 

Public Attributes

Setting< std::set< ExperimentalFeature > > experimentalFeatures
 

Additional Inherited Members

- Public Types inherited from nix::Config
using Settings = std::map<std::string, SettingData>
 
- Protected Member Functions inherited from nix::AbstractConfig
 AbstractConfig (StringMap initials={})
 
- Protected Attributes inherited from nix::AbstractConfig
StringMap unknownSettings
 

Member Function Documentation

◆ isEnabled() [1/2]

bool nix::ExperimentalFeatureSettings::isEnabled ( const ExperimentalFeature & feature) const

Check whether the given experimental feature is enabled.

◆ isEnabled() [2/2]

bool nix::ExperimentalFeatureSettings::isEnabled ( const std::optional< ExperimentalFeature > & feature) const

std::nullopt pointer means no feature, which means there is nothing that could be disabled, and so the function returns true in that case.

◆ require() [1/2]

void nix::ExperimentalFeatureSettings::require ( const ExperimentalFeature & feature) const

Require an experimental feature be enabled, throwing an error if it is not.

◆ require() [2/2]

void nix::ExperimentalFeatureSettings::require ( const std::optional< ExperimentalFeature > & feature) const

std::nullopt pointer means no feature, which means there is nothing that could be disabled, and so the function does nothing in that case.

Member Data Documentation

◆ experimentalFeatures

Setting<std::set<ExperimentalFeature> > nix::ExperimentalFeatureSettings::experimentalFeatures
Initial value:
{
this, {}, "experimental-features",
R"(
Experimental features that are enabled.
Example:
```
experimental-features = nix-command flakes
```
The following experimental features are available:
{{#include experimental-features-shortlist.md}}
Experimental features are [further documented in the manual](@docroot@/development/experimental-features.md).
)"}

The documentation for this struct was generated from the following files: