Struct light_ini::IniParser

source ·
pub struct IniParser<'a, Error: Debug + Error> { /* private fields */ }
Expand description

INI format parser.

Implementations§

Create a parser using the given handler.

Examples found in repository?
examples/hashmap.rs (line 72)
69
70
71
72
73
74
75
76
77
78
79
fn main() {
    for filename in env::args().skip(1) {
        let mut handler = Handler::new();
        let mut parser = IniParser::new(&mut handler);
        let path = PathBuf::from(&filename);
        parser.parse_file(path).unwrap();
        println!("File {}", filename);
        println!("Globals {:#?}", handler.globals);
        println!("Sections {:#?}", handler.sections);
    }
}

Parse input from a buffered reader.

Parse input from a reader.

Parse a file.

Examples found in repository?
examples/hashmap.rs (line 74)
69
70
71
72
73
74
75
76
77
78
79
fn main() {
    for filename in env::args().skip(1) {
        let mut handler = Handler::new();
        let mut parser = IniParser::new(&mut handler);
        let path = PathBuf::from(&filename);
        parser.parse_file(path).unwrap();
        println!("File {}", filename);
        println!("Globals {:#?}", handler.globals);
        println!("Sections {:#?}", handler.sections);
    }
}

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.