Trait CharSource

Source
pub trait CharSource {
    // Required method
    fn next(&mut self) -> Result<Option<char>, Error>;
}
Expand description

A source of master file characters.

This is very similar to an iterator except that next’s return value has the result outside for easier error handling.

Required Methods§

Source

fn next(&mut self) -> Result<Option<char>, Error>

Provides the next character in the source.

If the source runs out of characters, returns Ok(None).

Implementations on Foreign Types§

Source§

impl<'a> CharSource for &'a str

Source§

fn next(&mut self) -> Result<Option<char>, Error>

Implementors§