pub fn new(s: &'a str) -> Parser<'a> {
        Parser {
            input: s,
            cur: s.char_indices(),
            errors: Vec::new(),
            require_newline_after_table: true,
        }
    }
/// Creates a new parser for a string.
///
/// The parser can be executed by invoking the `parse` method.
///
/// # Example
///
/// ```
/// let toml = r#"
///     [test]
///     foo = "bar"
/// "#;
///
/// let mut parser = toml::Parser::new(toml);
/// match parser.parse() {
///     Some(value) => println!("found toml: {:?}", value),
///     None => {
///         println!("parse errors: {:?}", parser.errors);
///     }
/// }
/// ```
Creates a new parser for a string.
The parser can be executed by invoking the `parse` method.
Creates a new parser for a string . The parser can be executed by invoking the ` parse ` method .
pub fn new(s: &'a str) -> Parser<'a> {
        Parser {
            input: s,
            cur: s.char_indices(),
            errors: Vec::new(),
            require_newline_after_table: true,
        }
    }
pub fn new ( s : & ' a str ) -> Parser < ' a > { Parser { input : s , cur : s . char_indices ( ) , errors : Vec :: new ( ) , require_newline_after_table : true , } }
Creates a new parser for a string.
Creates a new parser for a string .
s
&'a str
s
&'a str
example


let mut parser = toml::Parser::new(toml);
match parser.parse() {
Some(value) => println!("found toml: {:?}", value),
None => {
println!("parse errors: {:?}", parser.errors);
}
}
```
let mut parser = toml :: Parser :: new ( toml ) ; match parser . parse () { Some ( value ) = > println! ( " found toml : { : ? } " value ) None = > { println! ( " parse errors : { : ? } " parser . errors ) ; } } ` ` `