1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#[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 {}