#[cfg(all(not(target_arch = "wasm32"), feature = "image"))]
use image::ImageError;
#[derive(Debug)]
pub enum BitMapBackendError {
InvalidBuffer,
IOError(std::io::Error),
#[cfg(all(feature = "gif", not(target_arch = "wasm32"), feature = "image"))]
GifEncodingError(gif::EncodingError),
#[cfg(all(not(target_arch = "wasm32"), feature = "image"))]
ImageError(ImageError),
}
impl std::fmt::Display for BitMapBackendError {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{:?}", self)
}
}
impl std::error::Error for BitMapBackendError {}