[−][src]Enum nbt::Error
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(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.
An error emitted when trying to create NbtBlob
s with incorrect lists.
An error for when NBT binary representations do not begin with an
NbtValue::Compound
.
An error for when NBT binary representations contain invalid UTF-8 strings.
An error for when NBT binary representations are missing end tags, contain fewer bytes than advertised, or are otherwise incomplete.
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.
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]
fn source(&self) -> Option<&(dyn StdError + 'static)>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn description(&self) -> &str
1.0.0[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl Error for Error
[src]
impl Error for Error
[src]
fn custom<T: Display>(msg: T) -> Error
[src]
fn invalid_type(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
[src]
fn invalid_value(unexp: Unexpected<'_>, exp: &dyn Expected) -> Self
[src]
fn invalid_length(len: usize, exp: &dyn Expected) -> Self
[src]
fn unknown_variant(variant: &str, expected: &'static [&'static str]) -> Self
[src]
fn unknown_field(field: &str, expected: &'static [&'static str]) -> Self
[src]
fn missing_field(field: &'static str) -> Self
[src]
fn duplicate_field(field: &'static str) -> Self
[src]
impl From<Cesu8DecodingError> for Error
[src]
fn from(_: Cesu8DecodingError) -> 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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,