Expand description
Ini parser for Rust
use ini::Ini;
let mut conf = Ini::new();
conf.with_section(Some("User"))
.set("name", "Raspberry树莓")
.set("value", "Pi");
conf.with_section(Some("Library"))
.set("name", "Sun Yat-sen U")
.set("location", "Guangzhou=world");
conf.write_to_file("conf.ini").unwrap();
let i = Ini::load_from_file("conf.ini").unwrap();
for (sec, prop) in i.iter() {
println!("Section: {:?}", sec);
for (k, v) in prop.iter() {
println!("{}:{}", k, v);
}
}
Structs§
- Ini
- Ini struct
- Parse
Error - Parse error
- Parse
Option - Parsing configuration
- Properties
- Properties type (key-value pairs)
- Properties
Into Iter - Property
Iter - Property
Iter Mut - Iterator for traversing sections
- Section
Into Iter - Iterator for traversing sections
- Section
Iter - Iterator for traversing sections
- Section
Iter Mut - Iterator for traversing sections
- Section
Occupied Entry - A view into a occupied entry in a
Ini
- Section
Setter - A setter which could be used to set key-value pair in a specified section
- Section
Vacant Entry - A view into a vacant entry in a
Ini
- Write
Option - Writing configuration
Enums§
- Error
- Error while parsing an INI document
- Escape
Policy - Policies for escaping logic
- Line
Separator - Newline style
- Section
Entry - A view into an
Ini
, which may either be vacant or occupied.
Type Aliases§
- Property
Key - Internal storage of property’s key
- Section
Key - Internal storage of section’s key