Skip to main content

background_picker/
error.rs

1#[derive(Debug, thiserror::Error)]
2pub enum BackgroundPickerError {
3    #[error("Failed to create thread pool: {0}")]
4    ThreadPoolCreation(#[from] rayon::ThreadPoolBuildError),
5
6    #[error("Failed to create thumbnail cache directory: {0}")]
7    CacheDirectoryCreation(#[from] std::io::Error),
8
9    #[error("Failed to save selected image path: {0}")]
10    SaveSelectedImage(std::io::Error),
11
12    #[error("Command execution failed: {0}")]
13    CommandExecution(String),
14}
15
16pub type Result<T> = std::result::Result<T, BackgroundPickerError>;