Enum utf8::DecodeError[][src]

pub enum DecodeError<'a> {
    Invalid {
        valid_prefix: &'a str,
        invalid_sequence: &'a [u8],
        remaining_input: &'a [u8],
    },
    Incomplete {
        valid_prefix: &'a str,
        incomplete_suffix: Incomplete,
    },
}

Variants

Invalid

In lossy decoding insert valid_prefix, then "\u{FFFD}", then call decode() again with remaining_input.

Fields of Invalid

valid_prefix: &'a strinvalid_sequence: &'a [u8]remaining_input: &'a [u8]
Incomplete

Call the incomplete_suffix.try_complete method with more input when available. If no more input is available, this is an invalid byte sequence.

Fields of Incomplete

valid_prefix: &'a strincomplete_suffix: Incomplete

Trait Implementations

impl<'a> Clone for DecodeError<'a>[src]

impl<'a> Copy for DecodeError<'a>[src]

impl<'a> Debug for DecodeError<'a>[src]

impl<'a> Display for DecodeError<'a>[src]

impl<'a> Error for DecodeError<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for DecodeError<'a>

impl<'a> Send for DecodeError<'a>

impl<'a> Sync for DecodeError<'a>

impl<'a> Unpin for DecodeError<'a>

impl<'a> UnwindSafe for DecodeError<'a>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.