[−][src]Struct rcin::RInStream
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
impl !RefUnwindSafe for RInStream
impl Send for RInStream
impl !Sync for RInStream
impl Unpin for RInStream
impl !UnwindSafe for RInStream
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>,