Enum nbt::Error [] [src]

pub enum Error {
    IoError(Error),
    InvalidTypeId(u8),
    HeterogeneousList,
    NoRootCompound,
    InvalidUtf8,
    IncompleteNbtValue,
    TagMismatch(u8, u8),
    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

Wraps errors emitted by methods during I/O operations.

InvalidTypeId

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

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

UnexpectedField

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

Trait Implementations

impl Display for Error

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

impl StdError for Error

fn description(&self) -> &str

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

impl PartialEq<Error> for Error

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

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

impl From<Error> for Error

fn from(e: Error) -> Error

impl From<FromUtf8Error> for Error

fn from(_: FromUtf8Error) -> Error

impl From<Error> for Error

fn from(err: Error) -> Error

Derived Implementations

impl Debug for Error

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