pub enum Error {
OutOfBounds(usize, usize),
UnableToOpenImage(String),
UnableToWriteImage(String),
CannotReadImage(String),
InvalidDimensions(usize, usize, usize),
FailedColorConversion(String, String),
MultipleImagesNotSupported(String),
InvalidType,
Message(String),
GLFW(Error),
GLFWInit(InitError),
IO(Error),
}
Expand description
Enumerates possible errors
Variants§
OutOfBounds(usize, usize)
Pixel is out of bounds
UnableToOpenImage(String)
An image file cannot be opened
UnableToWriteImage(String)
An image file cannot be written
CannotReadImage(String)
Image data is invalid
InvalidDimensions(usize, usize, usize)
Invalid image dimensions
FailedColorConversion(String, String)
Colorspace conversion failed
MultipleImagesNotSupported(String)
Unable to write an additional image to a single image file
InvalidType
Invalid image data type
Message(String)
Generic error
GLFW(Error)
GLFW error
GLFWInit(InitError)
GLFW init error
IO(Error)
Wraps std::io::Error
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)>
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()