taskqueue/
errors.rs

1use snafu::Snafu;
2
3#[derive(Debug, Snafu)]
4#[snafu(visibility(pub))]
5pub enum Error {
6    #[snafu(display("Empty worker thread handle"))]
7    EmptyWorkerThreadHandle,
8
9    #[snafu(display("Empty controller thread handle"))]
10    EmptyControllerThreadHandle,
11
12    #[snafu(display("Worker not found, id: {}", id))]
13    WorkerNotFound { id: usize },
14
15    #[snafu(display("Sync poison error: {}", description))]
16    PoisonError { description: String },
17
18    #[snafu(display("Task queue send task error. {}", explanation))]
19    TaskQueueSendError { explanation: String },
20}
21
22pub type Result<T, E = Error> = std::result::Result<T, E>;