pub enum ChunkReadError {
ChunkNotFound {
position: RegionChunkPosition,
},
LengthExceedsMaximum {
length: u32,
maximum_length: u32,
},
UnsupportedCompressionScheme {
compression_scheme: u8,
},
IOError {
io_error: Error,
},
TagDecodeError {
tag_decode_error: TagDecodeError,
},
}Expand description
Possible errors while loading the chunk.
Variants§
ChunkNotFound
Chunk at specified coordinates inside region not found.
Fields
§
position: RegionChunkPositionLengthExceedsMaximum
Chunk length overlaps declared maximum.
This should not occur under normal conditions.
Region file are corrupted.
UnsupportedCompressionScheme
Currently are only 2 types of compression: Gzip and Zlib.
This should not occur under normal conditions.
Region file are corrupted or was introduced new compression type.
IOError
I/O Error which happened while were reading chunk data from region file.
TagDecodeError
Error while decoding binary data to NBT tag.
This should not occur under normal conditions.
Region file are corrupted or a developer error in the NBT library.
Fields
§
tag_decode_error: TagDecodeErrorTrait Implementations§
Source§impl Debug for ChunkReadError
impl Debug for ChunkReadError
Source§impl From<Error> for ChunkReadError
impl From<Error> for ChunkReadError
Source§impl From<TagDecodeError> for ChunkReadError
impl From<TagDecodeError> for ChunkReadError
Source§fn from(tag_decode_error: TagDecodeError) -> Self
fn from(tag_decode_error: TagDecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ChunkReadError
impl !RefUnwindSafe for ChunkReadError
impl Send for ChunkReadError
impl Sync for ChunkReadError
impl Unpin for ChunkReadError
impl UnsafeUnpin for ChunkReadError
impl !UnwindSafe for ChunkReadError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more