Struct std::rt::io::extensions::ByteIterator

pub struct ByteIterator<T> {
    priv reader: T,
}

An iterator that reads a single byte on each iteration, until .read_byte() returns None.

Notes about the Iteration Protocol

The ByteIterator may yield None and thus terminate an iteration, but continue to yield elements if iteration is attempted again.

Failure

Raises the same conditions as the read method, for each call to its .next() method. Yields None if the condition is handled.

Trait Implementations

impl<R> Decorator<R> for ByteIterator<R>

fn inner(self) -> R

Destroy the decorator and extract the decorated value

XXX

Because this takes `self' one could never 'undecorate' a Reader/Writer that has been boxed. Is that ok? This feature is mostly useful for extracting the buffer from MemWriter

fn inner_ref<'a>(&'a self) -> &'a R

Take an immutable reference to the decorated value

fn inner_mut_ref<'a>(&'a mut self) -> &'a mut R

Take a mutable reference to the decorated value

impl<'self, R: Reader> Iterator<u8> for ByteIterator<R>

fn next(&mut self) -> Option<u8>

Advance the iterator and return the next value. Return None when the end is reached.