Struct fmt_macros::ParserExperimental [-]  [+] [src]

pub struct Parser<'a> {
    pub errors: Vec<String>,
    // some fields omitted
}

The parser structure for interpreting the input format string. This is modelled as an iterator over Piece structures to form a stream of tokens being output.

This is a recursive-descent parser for the sake of simplicity, and if necessary there's probably lots of room for improvement performance-wise.

Fields

errors

Error messages accumulated during parsing

Methods

impl<'a> Parser<'a>

fn new(s: &'a str) -> Parser<'a>

Creates a new parser for the given format string

Trait Implementations

impl<'a> Iterator<Piece<'a>> for Parser<'a>

fn next(&mut self) -> Option<Piece<'a>>

fn size_hint(&self) -> (uint, Option<uint>)