#[non_exhaustive]
pub enum ErrorKind {
Other,
Eof,
UnexpectedEof,
InvalidTag,
Nonunicode(Vec<u8>),
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more