graph_error/
io_error.rs

1use std::{path::PathBuf, sync::mpsc};
2
3#[derive(Debug, thiserror::Error)]
4pub enum ThreadedIoError {
5    #[error(transparent)]
6    Std(#[from] std::io::Error),
7
8    #[error("failed to send result path: {0}")]
9    Send(#[from] mpsc::SendError<Option<PathBuf>>),
10
11    #[error("failed to receive result path: {0}")]
12    Receive(#[from] mpsc::RecvError),
13
14    #[error("failed to join copy thread")]
15    Join(Box<dyn std::any::Any + Send + 'static>),
16
17    #[error("received an null path buffer")]
18    NoPath,
19}
20
21#[derive(Debug, thiserror::Error)]
22pub enum AsyncIoError {
23    #[error(transparent)]
24    Std(#[from] std::io::Error),
25
26    #[error(transparent)]
27    ResponseStream(#[from] reqwest::Error),
28}