[−][src]Struct proconio::source::once::OnceSource
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
fn next_token_unwrap(&mut self) -> &str
[src]
Auto Trait Implementations
impl<R> RefUnwindSafe for OnceSource<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for OnceSource<R> where
R: Send,
R: Send,
impl<R> Sync for OnceSource<R> where
R: Sync,
R: Sync,
impl<R> Unpin for OnceSource<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for OnceSource<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,