pub enum FigifError {
FileRead {
path: PathBuf,
source: Error,
},
FileWrite {
path: PathBuf,
source: Error,
},
DecodeError {
reason: String,
},
EncodeError {
reason: String,
},
InvalidFrameIndex {
index: usize,
total: usize,
},
InvalidSegmentId {
id: usize,
total: usize,
},
InvalidConfig {
message: String,
},
DimensionMismatch {
expected_width: u32,
expected_height: u32,
actual_width: u32,
actual_height: u32,
},
NoFrames,
ImageError {
reason: String,
},
HashError {
reason: String,
},
EmptyData,
}Expand description
Errors that can occur during GIF processing.
Variants§
FileRead
Failed to read or open a file.
FileWrite
Failed to write a file.
Fields
DecodeError
GIF decoding failed.
EncodeError
GIF encoding failed.
InvalidFrameIndex
Invalid frame index.
InvalidSegmentId
Invalid segment ID.
InvalidConfig
Invalid configuration parameter.
DimensionMismatch
Frame dimensions mismatch.
Fields
NoFrames
No frames in the GIF.
ImageError
Image processing error.
HashError
Hashing error.
EmptyData
The GIF data is empty or invalid.
Trait Implementations§
Source§impl Debug for FigifError
impl Debug for FigifError
Source§impl Display for FigifError
impl Display for FigifError
Source§impl Error for FigifError
impl Error for FigifError
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<DecodingError> for FigifError
impl From<DecodingError> for FigifError
Source§fn from(err: DecodingError) -> Self
fn from(err: DecodingError) -> Self
Converts to this type from the input type.
Source§impl From<ImageError> for FigifError
impl From<ImageError> for FigifError
Source§fn from(err: ImageError) -> Self
fn from(err: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FigifError
impl !RefUnwindSafe for FigifError
impl Send for FigifError
impl Sync for FigifError
impl Unpin for FigifError
impl UnsafeUnpin for FigifError
impl !UnwindSafe for FigifError
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