cadmus_core/device/usb/
error.rs1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum UsbError {
8 #[error("Failed to read device info: {0}")]
10 DeviceInfo(String),
11
12 #[error("USB gadget configuration failed: {0}")]
14 GadgetConfig(String),
15
16 #[error("Kernel module operation failed: {0}")]
18 KernelModule(String),
19
20 #[error("Partition operation failed: {0}")]
22 Partition(String),
23
24 #[error("Filesystem check failed: {0}")]
26 Filesystem(String),
27
28 #[error("UDC not available: {0}")]
30 Udc(String),
31
32 #[error("I/O error: {0}")]
34 Io(#[from] std::io::Error),
35}