Struct utf8_chars::ReadCharError[][src]

pub struct ReadCharError { /* fields omitted */ }

A structure, containing read bytes, and an io::Error. The io::Error is an actual I/O error if some occurred, or a synthetic error with either the UnexpectedEof kind if a multi-byte char was unexpectedly terminated, either the InvalidData kind if no actual I/O error occurred, but read byte sequence was not recognised as a valid UTF-8.

Implementations

impl ReadCharError[src]

pub fn as_bytes(&self) -> &[u8][src]

A byte sequence, representing an invalid or incomplete UTF-8-encoded char.

pub fn as_io_error(&self) -> &Error[src]

Returns a reference to the I/O error.

pub fn into_io_error(self) -> Error[src]

Consumes the ReadCharError, returning the I/O error.

Trait Implementations

impl Debug for ReadCharError[src]

impl Display for ReadCharError[src]

impl Error for ReadCharError[src]

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> ToString for T where
    T: Display + ?Sized
[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.