Enum nbt::Error [] [src]

pub enum Error {
    IoError(Error),
    InvalidTypeId(u8),
    HeterogeneousList,
    NoRootCompound,
    InvalidUtf8,
    IncompleteNbtValue,
    TagMismatch(u8u8),
    UnexpectedField(String),
}

Errors that may be encountered when constructing, parsing, or encoding NbtValue and NbtBlob objects.

Errors can be seamlessly converted to more general io::Error objects using std::convert::From::from().

Variants

IoError(Error)

Wraps errors emitted by methods during I/O operations.

InvalidTypeId(u8)

An error for when an unknown type ID is encountered in decoding NBT binary representations. Includes the ID in question.

HeterogeneousList

An error emitted when trying to create NbtBlobs with incorrect lists.

NoRootCompound

An error for when NBT binary representations do not begin with an NbtValue::Compound.

InvalidUtf8

An error for when NBT binary representations contain invalid UTF-8 strings.

IncompleteNbtValue

An error for when NBT binary representations are missing end tags, contain fewer bytes than advertised, or are otherwise incomplete.

TagMismatch(u8u8)

An error encountered when parsing NBT binary representations, where deserialization encounters a different tag than expected.

UnexpectedField(String)

An error encountered when parsing NBT binary representations, where deserialization encounters a field name it is not expecting.

Trait Implementations

impl Debug for Error
[src]

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

Formats the value using the given formatter.

impl Display for Error
[src]

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

Formats the value using the given formatter.

impl StdError for Error
[src]

fn description(&self) -> &str

A short description of the error. Read more

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

The lower-level cause of this error, if any. Read more

impl PartialEq<Error> for Error
[src]

fn eq(&self, other: &Error) -> bool

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

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl From<Error> for Error
[src]

fn from(e: Error) -> Error

Performs the conversion.

impl From<FromUtf8Error> for Error
[src]

fn from(_: FromUtf8Error) -> Error

Performs the conversion.