Enum encode_unicode::error::InvalidUtf8 [] [src]

pub enum InvalidUtf8 {
    FirstByte(InvalidUtf8FirstByte),
    NotAContinuationByte(usize),
    OverLong,
}

Reasons why a byte sequence is not valid UTF-8, excluding invalid codepoint. In sinking precedence.

Variants

Something is wrong with the first byte.

Thee byte at index 1...3 should be a continuation byte, but dosesn't fit the pattern 0b10xx_xxxx.

There are too many leading zeros: it could be a byte shorter.

Decoding this could allow someone to input otherwise prohibited characters and sequences, such as "../".

Trait Implementations

impl Clone for InvalidUtf8
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for InvalidUtf8
[src]

impl Debug for InvalidUtf8
[src]

Formats the value using the given formatter.

impl PartialEq for InvalidUtf8
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for InvalidUtf8
[src]

impl From<InvalidUtf8FirstByte> for InvalidUtf8
[src]

Performs the conversion.

impl Error for InvalidUtf8
[src]

A short description of the error. Read more

Returns Some if the error is a InvalidUtf8FirstByte.

impl Display for InvalidUtf8
[src]

Formats the value using the given formatter. Read more