[][src]Struct read_iter::ReadIter

pub struct ReadIter<T> where
    T: Read
{ /* fields omitted */ }

Object that wraps std::io::Read, and also implements std::io::Read. It also implements std::io::BufRead and Iterator<Item=u8>.

Implementations

impl<T> ReadIter<T> where
    T: Read
[src]

pub fn new(reader: T) -> Self[src]

pub fn last_error(&self) -> &Option<Error>[src]

Iteration can end in 2 cases:

  • end of stream reached
  • i/o error occured

If there was error, this function returns &Some(err).

pub fn take_last_error(&mut self) -> Result<(), Error>[src]

Iteration can end in 2 cases:

  • end of stream reached
  • i/o error occured

If there was error, this function returns Err(err), and clears the error state.

Trait Implementations

impl<T> BufRead for ReadIter<T> where
    T: Read
[src]

impl<T, '_> Iterator for &'_ mut ReadIter<T> where
    T: Read
[src]

type Item = u8

The type of the elements being iterated over.

impl<T> Read for ReadIter<T> where
    T: Read
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for ReadIter<T>

impl<T> Send for ReadIter<T> where
    T: Send

impl<T> Sync for ReadIter<T> where
    T: Sync

impl<T> Unpin for ReadIter<T> where
    T: Unpin

impl<T> !UnwindSafe for ReadIter<T>

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.