Everything is exported from the crate root:
use openmw_config::{ConfigError, OpenMWConfiguration};
OpenMWConfiguration is the configuration: a whole chain, loaded, with every setting tagged with
the file it came from. Its methods are grouped here by what they are for. Every fallible call
returns Result<_, ConfigError>.
| Page | Covers |
|---|---|
| Loading | from_env, from_env_or_user_config, new, new_empty, load_optional, and the root and user config accessors |
| Chain | config_chain, sub_configs, ConfigChainEntry, ConfigChainStatus |
| Content files and archives | content=, groundcover= and fallback-archive=: iterate, check, add, remove, replace |
| Directories | data=, and the single-valued resources=, user-data= and data-local= |
| Settings | fallback=, encoding=, unknown keys, and any setting by predicate |
| Saving and serialization | save_user, save_subconfig, save_to_path, save_resolved_to_path, Display, to_resolved_string |
| Setting types | FileSetting, DirectorySetting, GameSettingType, GenericSetting, EncodingSetting, EncodingType, GameSettingMeta |
| Path functions | The default_* and try_default_* functions |
| ConfigError | Every error, when it happens, and what it says |
OpenMWConfiguration implements Clone, Debug, Default and Display. Default is an empty
configuration with no root path; start from new_empty() instead, which knows where it would
save.
Features#
| Feature | Adds |
|---|---|
luau | The luau module: luau::extension(), the l3i extension a host composes into its runtime plan, and luau::Config. Adds l3i. See the Lua API and Embedding Luau. |
luau-analysis | luau, with l3i’s analysis feature: Luau’s type checker, which the crate’s tests run over the module’s declared types. |
Neither is on by default.