1use std::fmt::Debug;
4use thiserror::Error;
5
6#[derive(Error, Debug)]
8#[non_exhaustive]
9pub enum AsyncTiffError {
10 #[error("End of File: expected to read {0} bytes, got {1}")]
12 EndOfFile(usize, usize),
13
14 #[error("General error: {0}")]
16 General(String),
17
18 #[error(transparent)]
20 IOError(#[from] std::io::Error),
21
22 #[error(transparent)]
24 JPEGDecodingError(#[from] jpeg::Error),
25
26 #[error(transparent)]
28 ObjectStore(#[from] object_store::Error),
29
30 #[error(transparent)]
32 InternalTIFFError(#[from] crate::tiff::TiffError),
33
34 #[error(transparent)]
36 ReqwestError(#[from] reqwest::Error),
37}
38
39pub type AsyncTiffResult<T> = std::result::Result<T, AsyncTiffError>;