[][src]Struct rcin::RInStream

pub struct RInStream { /* fields omitted */ }

Stream based on a source

Methods

impl RInStream[src]

pub fn from_file(f: File) -> Self[src]

Create new stream from file

pub fn from_source(src: Box<dyn Read + Send>) -> Self[src]

Create new stream from source

pub fn new(src: Box<dyn Read + Send>, cap: usize) -> Self[src]

Create new stream from source with given buffer size in bytes

pub fn read_char(&mut self) -> Option<char>[src]

Read the next character (can be whitespace)

pub fn read<T: FromStr>(&mut self) -> Option<T>[src]

Read value

pub fn read_line(&mut self) -> Option<String>[src]

Read line

pub fn skip_line(&mut self)[src]

Skip all chars until next newline

pub fn valid(&self) -> bool[src]

Stream becomes invalid as soon as the source returns an error

Auto Trait Implementations

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.