pub enum ReaderError {
IoError(Error),
FromUtf8Error(FromUtf8Error),
InvalidColorId(u8),
InvalidOrientation(u8),
InvalidMagicNumber([u8; 3]),
UnsupportedVersion(u8),
InvalidBlockType(u8),
InvalidBrickTypeId(u16),
}Expand description
An error which may be returned when reading from a Reader.
Variants§
IoError(Error)
An IO error has occured in the underlying Read.
FromUtf8Error(FromUtf8Error)
A string was encountered that isn’t valid utf-8.
InvalidColorId(u8)
A color id has been encountered that isn’t in the palette.
InvalidOrientation(u8)
An orientation that is outside of the 0..=3 range has been encountered.
InvalidMagicNumber([u8; 3])
This Read doesn’t start with b"ttb".
UnsupportedVersion(u8)
This version is not supported by this crate.
InvalidBlockType(u8)
An invalid block type has been encountered.
InvalidBrickTypeId(u16)
A brick has been encountered that has a brick type that isn’t in the brick type table.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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