[][src]Trait proconio::source::Source

pub trait Source<R: BufRead> {
    fn next_token(&mut self) -> Option<&str>;
fn is_empty(&mut self) -> bool; fn next_token_unwrap(&mut self) -> &str { ... } }

The main trait. Types implementing this trait can be used for source of input! macro.

Required methods

fn next_token(&mut self) -> Option<&str>

Gets a whitespace-splitted next token.

fn is_empty(&mut self) -> bool

Check if tokens are empty

Loading content...

Provided methods

fn next_token_unwrap(&mut self) -> &str

Force gets a whitespace-splitted next token.

Loading content...

Implementations on Foreign Types

impl<'_, R: BufRead, S: Source<R>> Source<R> for &'_ mut S[src]

Loading content...

Implementors

impl<R: BufRead> Source<R> for LineSource<R>[src]

fn next_token(&mut self) -> Option<&str>[src]

Gets a next token.

fn is_empty(&mut self) -> bool[src]

Check if tokens are empty

impl<R: BufRead> Source<R> for OnceSource<R>[src]

fn next_token(&mut self) -> Option<&str>[src]

Gets a next token.

fn is_empty(&mut self) -> bool[src]

Check if tokens are empty

Loading content...