pub trait Source<R: BufRead> {
// Required methods
fn next_token(&mut self) -> Option<&str>;
fn is_empty(&mut self) -> bool;
// Provided method
fn next_token_unwrap(&mut self) -> &str { ... }
}
Expand description
The main trait. Types implementing this trait can be used for source of input!
macro.
Required Methods§
sourcefn next_token(&mut self) -> Option<&str>
fn next_token(&mut self) -> Option<&str>
Gets a whitespace-splitted next token.
Provided Methods§
sourcefn next_token_unwrap(&mut self) -> &str
fn next_token_unwrap(&mut self) -> &str
Force gets a whitespace-splitted next token.