pub enum GifError {
Truncated,
BadSignature,
BadVersion,
BadLzw,
BadBlock,
Overflow,
UnexpectedEof,
InvalidPalette,
InvalidDisposal,
FrameOutOfBounds,
}Available on crate feature
gif only.Expand description
Why a GIF could not be decoded.
Variants§
Truncated
Byte stream ended before a complete block.
BadSignature
Missing or invalid GIF87a / GIF89a signature.
BadVersion
Signature was present but not a supported version.
BadLzw
LZW bitstream could not be decoded.
BadBlock
Malformed extension or image block.
Overflow
Width/height or rectangle arithmetic overflowed.
UnexpectedEof
Expected more bytes in a sub-block.
InvalidPalette
Required color table missing or oversized.
InvalidDisposal
Disposal method value is outside 0..=3.
FrameOutOfBounds
Requested frame index exceeds GifInfo::frame_count.
Trait Implementations§
impl Eq for GifError
Source§impl Error for GifError
impl Error for GifError
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()
impl StructuralPartialEq for GifError
Auto Trait Implementations§
impl Forget for GifError
impl Freeze for GifError
impl Move for GifError
impl RefUnwindSafe for GifError
impl Send for GifError
impl Sync for GifError
impl Unpin for GifError
impl UnsafeUnpin for GifError
impl UnwindSafe for GifError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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