[][src]Struct proconio::source::once::OnceSource

pub struct OnceSource<R: BufRead> { /* fields omitted */ }

Source reading entire content for the first time.

It is a wrapper for BufRead. You can create OnceSource from any type implementing BufRead.

Methods

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

pub fn new(source: R) -> OnceSource<R>[src]

Creates Source using specified reader of BufRead.

Trait Implementations

impl<'a> From<&'a str> for OnceSource<BufReader<&'a [u8]>>[src]

You can create LineSource from &str. Since &[u8] is a Read, BufRead can be easily created by wrapping using BufReader.

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

Auto Trait Implementations

impl<R> RefUnwindSafe for OnceSource<R> where
    R: RefUnwindSafe

impl<R> Send for OnceSource<R> where
    R: Send

impl<R> Sync for OnceSource<R> where
    R: Sync

impl<R> Unpin for OnceSource<R> where
    R: Unpin

impl<R> UnwindSafe for OnceSource<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.