#[non_exhaustive]pub enum ImageIoError {
Convert(ConvertError),
Size {
samples: usize,
width: u32,
height: u32,
channels: usize,
},
Layout,
Extension(PathBuf),
Encode(Box<dyn Error + Send + Sync + 'static>),
Io(Error),
}Expand description
Why an image could not be written.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Convert(ConvertError)
The frame’s pixels could not be converted.
Size
pixels is not width × height samples (of channels each).
Fields
Layout
A pixel layout this encoder does not write.
Extension(PathBuf)
The path does not name a format: it ends in none of .png, .tif,
.tiff.
Encode(Box<dyn Error + Send + Sync + 'static>)
The PNG or TIFF encoder refused the image. The source is the encoder’s error.
Io(Error)
Writing the file failed.
Trait Implementations§
Source§impl Debug for ImageIoError
impl Debug for ImageIoError
Source§impl Display for ImageIoError
impl Display for ImageIoError
Source§impl Error for ImageIoError
impl Error for ImageIoError
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<ConvertError> for ImageIoError
impl From<ConvertError> for ImageIoError
Source§fn from(source: ConvertError) -> Self
fn from(source: ConvertError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ImageIoError
impl !UnwindSafe for ImageIoError
impl Freeze for ImageIoError
impl Send for ImageIoError
impl Sync for ImageIoError
impl Unpin for ImageIoError
impl UnsafeUnpin for ImageIoError
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