Enum utf8::Result [] [src]

pub enum Result<'a> {
    Ok,
    Incomplete,
    Error {
        remaining_input_after_error: &'a [u8],
    },
}

Variants

Ok

The input chunk is entirely well-formed. The returned &str goes to its end.

Incomplete

The end of the input chunk was reached in the middle of an UTF-8 sequence that is valid so far. More input (up to 3 more bytes) is required to decode that sequence. At the end of the input, the sequence is ill-formed and this is a decoding error.

Error

An ill-formed byte sequence was found. This is a decoding error. If errors are not fatal, decoding should continue after handling the error (typically by appending a U+FFFD replacement character to the output) by calling Decoder::decode again with remaining_input_after_error as its argument.

Fields

remaining_input_after_error: &'a [u8]

Trait Implementations

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

fn clone(&self) -> Result<'a>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

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

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

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.