Skip to content
openmw-config
api

Rust API

Every public type, method and function in openmw-config, grouped by what you are doing.

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>.

PageCovers
Loadingfrom_env, from_env_or_user_config, new, new_empty, load_optional, and the root and user config accessors
Chainconfig_chain, sub_configs, ConfigChainEntry, ConfigChainStatus
Content files and archivescontent=, groundcover= and fallback-archive=: iterate, check, add, remove, replace
Directoriesdata=, and the single-valued resources=, user-data= and data-local=
Settingsfallback=, encoding=, unknown keys, and any setting by predicate
Saving and serializationsave_user, save_subconfig, save_to_path, save_resolved_to_path, Display, to_resolved_string
Setting typesFileSetting, DirectorySetting, GameSettingType, GenericSetting, EncodingSetting, EncodingType, GameSettingMeta
Path functionsThe default_* and try_default_* functions
ConfigErrorEvery 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#

FeatureAdds
luauThe 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-analysisluau, 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.