Enum std::str::Utf8ErrorUnstable [-] [+] [src]

pub enum Utf8Error {
    InvalidByte(usize),
    TooShort,
}

Errors which can occur when attempting to interpret a byte slice as a str.

Variants

InvalidByte

An invalid byte was detected at the byte offset given.

The offset is guaranteed to be in bounds of the slice in question, and the byte at the specified offset was the first invalid byte in the sequence detected.

TooShort

The byte slice was invalid because more bytes were needed but no more bytes were available.

Trait Implementations

impl Error for Utf8Error

fn description(&self) -> &str

fn cause(&self) -> Option<&Error>

impl Display for Utf8Error

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

Derived Implementations

impl Debug for Utf8Error

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

impl Clone for Utf8Error

fn clone(&self) -> Utf8Error

fn clone_from(&mut self, &Utf8Error)

impl PartialEq<Utf8Error> for Utf8Error

fn eq(&self, __arg_0: &Utf8Error) -> bool

fn ne(&self, __arg_0: &Utf8Error) -> bool

fn ne(&self, &Utf8Error) -> bool

impl Eq for Utf8Error

fn assert_receiver_is_total_eq(&self)

impl Copy for Utf8Error