![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
Public Member Functions | |
| bool | isEnabled (const ExperimentalFeature &) const |
| void | require (const ExperimentalFeature &, std::string reason="") const |
| template<typename GetReason> requires std::invocable<GetReason> && std::convertible_to<std::invoke_result_t<GetReason>, std::string> | |
| void | require (const ExperimentalFeature &feature, const GetReason &getReason) 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) const override |
| void | resetOverridden () override |
| nlohmann::json | toJSON () override |
| std::string | toKeyValue (bool overriddenOnly=false) 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 |
| bool nix::ExperimentalFeatureSettings::isEnabled | ( | const ExperimentalFeature & | feature | ) | const |
Check whether the given experimental feature is enabled.
| 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.
| void nix::ExperimentalFeatureSettings::require | ( | const ExperimentalFeature & | feature, |
| std::string | reason = "" ) const |
Require an experimental feature be enabled, throwing an error if it is not.
|
inline |
Require an experimental feature be enabled, throwing an error if it is not. The reason is lazily evaluated only if the feature is disabled.
| 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.
| Setting<std::set<ExperimentalFeature> > nix::ExperimentalFeatureSettings::experimentalFeatures |