[][src]Trait competitive_hpp::prelude::source::Source

pub trait Source<R> where
    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, S> Source<R> for &'_ mut S where
    R: BufRead,
    S: Source<R>, 
[src]

Loading content...

Implementors

impl<R> Source<R> for LineSource<R> where
    R: BufRead
[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> Source<R> for OnceSource<R> where
    R: BufRead
[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...