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 from a string.

Parses an Ini from raw bytes.

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.

Returns a mutable reference to the specified value, if any.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.