Skip to main content

threatflux_hashing/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum HashError {
5    #[error("IO error: {0}")]
6    Io(#[from] std::io::Error),
7
8    #[error("Failed to acquire semaphore")]
9    SemaphoreError,
10
11    #[error("Task join error: {0}")]
12    JoinError(#[from] tokio::task::JoinError),
13}
14
15pub type Result<T> = std::result::Result<T, HashError>;