[][src]Enum nbt::Error

pub enum Error {
    IoError(Error),
    Serde(String),
    InvalidTypeId(u8),
    HeterogeneousList,
    NoRootCompound,
    InvalidUtf8,
    IncompleteNbtValue,
    TagMismatch(u8u8),
    UnexpectedField(String),
    NonBooleanByte(i8),
    UnrepresentableType(&'static str),
    NonStringMapKey,
}

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.

Serde(String)

Wraps errors emitted during (de-)serialization with serde.

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.

NonBooleanByte(i8)

An error encountered when deserializing a boolean from an invalid byte.

UnrepresentableType(&'static str)

An error encountered when serializing a Rust type with no meaningful NBT representation.

NonStringMapKey

An error encountered when trying to (de)serialize a map key with a non-string type.

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl Error for Error[src]

impl Error for Error[src]

impl From<Cesu8DecodingError> for Error[src]

impl From<Error> for Error[src]

impl From<Error> for Error[src]

impl PartialEq<Error> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.