[][src]Struct unicode_reader::CodePoints

pub struct CodePoints<R: Iterator<Item = Result<u8>>> { /* fields omitted */ }

Wraps a byte-oriented reader and yields the UTF-8 data one code point at a time. Any UTF-8 parsing errors are raised as io::Error with ErrorKind::InvalidData.

Trait Implementations

impl<R: Iterator<Item = Result<u8>>> From<R> for CodePoints<R>[src]

impl<R: Read> From<R> for CodePoints<Bytes<R>>[src]

CodePoints can be constructed for any byte-oriented reader.

impl<R: Iterator<Item = Result<u8>>> Iterator for CodePoints<R>[src]

type Item = Result<char>

The type of the elements being iterated over: a io::Result with one Unicode code point (as a char), or any I/O error raised by the underlying reader, or any error encountered while trying to parse the byte stream as UTF-8.

fn next(&mut self) -> Option<Self::Item>[src]

Get the next Unicode code point from the stream. Any malformed UTF-8 data will be returned as an io::Error with ErrorKind::InvalidData, including if the stream reaches EOF before a complete code point is read (which is returned as ErrorKind::UnexpectedEof). Any I/O error raised by the underlying stream will be returned as well.

Auto Trait Implementations

impl<R> RefUnwindSafe for CodePoints<R> where
    R: RefUnwindSafe

impl<R> Send for CodePoints<R> where
    R: Send

impl<R> Sync for CodePoints<R> where
    R: Sync

impl<R> Unpin for CodePoints<R> where
    R: Unpin

impl<R> UnwindSafe for CodePoints<R> where
    R: UnwindSafe

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<!> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.