Struct winsafe::Ini [−][src]
pub struct Ini {
pub sections: Vec<IniSection>,
}
Expand description
Keeps sections and key/value pairs of a .ini
file, also doing parsing and
serialization of the data.
Examples
ⓘ
use winsafe::Ini;
let fini = Ini::parse_from_file("C:\\Temp\\my_file.ini")?;
for section in fini.sections.iter() {
println!("Section: {}", section.name);
for entry of section.entries.iter() {
println!("Key: {}; Value: {}", entry.key, entry.val);
}
}
Fields
sections: Vec<IniSection>
All the sections of the file.
Implementations
Parses an Ini
directly from a file.
Serializes the data to a string.
Serializes the data to raw bytes.
Serializes the data directly to a file.
Returns a reference to the specified value, if any.