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.
Error
s 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 |
NoRootCompound | An error for when NBT binary representations do not begin with an
|
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. |