#[non_exhaustive]pub enum ErrorKind {
Other,
Eof,
UnexpectedEof,
InvalidTag,
Nonunicode(Vec<u8>),
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Other
Any other errors. Users should not match on this variant and should
instead use a wildcard _
. Errors in this category may be moved to new variants.
Eof
End of file. This occurs when EOF happens at the end of a tag and value, so it may not be an error, it could be the natural end of the NBT. The parser does not have enough context to tell the difference as it does not track the overall structure of the NBT.
UnexpectedEof
EOF that occurred part way through some NBT value.
InvalidTag
Nonunicode(Vec<u8>)
Expected unicode data but was not valid. Parser remains valid if just this value was not unicode. Contained bytes are the invalid unicode data.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more