pub struct DirectorySetting {
pub meta: GameSettingMeta,
/* private fields */
}Expand description
A directory path entry from an openmw.cfg file (data=, config=, user-data=, etc.).
Stores both the original string exactly as it appeared in the file (for round-trip
serialisation) and a parsed PathBuf with quotes stripped, token substitution applied
(?local?, ?global?, ?userdata?, ?userconfig?), and the path resolved relative to the
config file’s directory.
Fields§
§meta: GameSettingMetaImplementations§
Source§impl DirectorySetting
impl DirectorySetting
Sourcepub fn new<S: Into<String>>(
value: S,
source_config: PathBuf,
comment: &mut String,
) -> Self
pub fn new<S: Into<String>>( value: S, source_config: PathBuf, comment: &mut String, ) -> Self
Parses value as a directory path relative to source_config.
Consumes the accumulated comment string (via std::mem::take) and stores it in the
setting’s metadata so comments are preserved through serialisation.
Sourcepub fn original(&self) -> &String
pub fn original(&self) -> &String
The raw string exactly as it appeared in the openmw.cfg file, including any quotes.
Use this when serialising back to openmw.cfg format to preserve the original style.
Sourcepub fn original_str(&self) -> &str
pub fn original_str(&self) -> &str
Borrowed string view of Self::original.
Trait Implementations§
Source§impl Clone for DirectorySetting
impl Clone for DirectorySetting
Source§fn clone(&self) -> DirectorySetting
fn clone(&self) -> DirectorySetting
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more