1#[derive(Debug, thiserror::Error)]
2pub enum Error {
3 #[error("DMA error: {0}")]
4 Dma(#[from] dma_api::DmaError),
5
6 #[error("MMIO map error: {0}")]
7 Mmio(#[from] mmio_api::MapError),
8
9 #[error("unsupported device")]
10 Unsupported,
11
12 #[error("link down")]
13 LinkDown,
14
15 #[error("invalid argument: {0}")]
16 InvalidArgument(&'static str),
17
18 #[error("operation timeout")]
19 Timeout,
20
21 #[error("other: {0}")]
22 Other(&'static str),
23}
24
25pub type Result<T = ()> = core::result::Result<T, Error>;