pub enum Error<I: Debug> {
WrongMagic(String),
ExternalMipmap(usize, Box<dyn Error>),
MissingImage(usize),
OutOfBounds(usize),
Blp2NoExternalMips,
Blp2UnknownCompression(u8),
Blp2UnknownAlphaType(u8),
Blp2UnexpectedJpegCompression,
Nom(I, ErrorKind),
Context(String, Box<Self>),
}
Expand description
Errors that BLP parser can produce
Variants§
WrongMagic(String)
ExternalMipmap(usize, Box<dyn Error>)
MissingImage(usize)
OutOfBounds(usize)
Blp2NoExternalMips
Blp2UnknownCompression(u8)
Blp2UnknownAlphaType(u8)
Blp2UnexpectedJpegCompression
Nom(I, ErrorKind)
Context(String, Box<Self>)
Trait Implementations§
Source§impl<I: Debug> Error for Error<I>
impl<I: Debug> Error for Error<I>
1.30.0 · 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<'a> ParseError<&'a [u8]> for Error<&'a [u8]>
impl<'a> ParseError<&'a [u8]> for Error<&'a [u8]>
Source§fn from_error_kind(input: &'a [u8], kind: ErrorKind) -> Self
fn from_error_kind(input: &'a [u8], kind: ErrorKind) -> Self
Creates an error from the input position and an ErrorKind
Source§fn append(_: &[u8], _: ErrorKind, other: Self) -> Self
fn append(_: &[u8], _: ErrorKind, other: Self) -> Self
Combines an existing error with a new one created from the input
position and an ErrorKind. This is useful when backtracking
through a parse tree, accumulating error context on the way
Auto Trait Implementations§
impl<I> Freeze for Error<I>where
I: Freeze,
impl<I> !RefUnwindSafe for Error<I>
impl<I> !Send for Error<I>
impl<I> !Sync for Error<I>
impl<I> Unpin for Error<I>where
I: Unpin,
impl<I> !UnwindSafe for Error<I>
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