Trait Source

Source
pub trait Source: Debug {
    // Required methods
    fn filename(&self) -> Option<String>;
    fn eat(&mut self) -> Option<char>;
    fn pos(&self) -> Pos;
    fn peek(&self) -> Option<char>;
}

Required Methods§

Source

fn filename(&self) -> Option<String>

Get the filename of the source, or None if the source has no filename

Source

fn eat(&mut self) -> Option<char>

Consume and get the next character in the content of the source. Return None if no character can be read.

Source

fn pos(&self) -> Pos

Get the current position in the source

Source

fn peek(&self) -> Option<char>

Peek the next character in the source

Implementors§