cadmus_core/device/wifi/
error.rs

1//! WiFi error types.
2
3use thiserror::Error;
4
5/// Errors that can occur during WiFi operations.
6#[derive(Error, Debug)]
7pub enum WifiError {
8    /// Failed to read device information.
9    #[error("Failed to read device info: {0}")]
10    DeviceInfo(String),
11
12    /// Kernel module operation failed.
13    #[error("Kernel module operation failed: {0}")]
14    KernelModule(String),
15
16    /// WiFi interface operation failed.
17    #[error("WiFi interface operation failed: {0}")]
18    Interface(String),
19
20    /// ioctl operation failed.
21    #[error("ioctl operation failed: {0}")]
22    Ioctl(String),
23
24    /// Configuration file error.
25    #[error("Configuration error: {0}")]
26    Config(String),
27
28    /// I/O error.
29    #[error("I/O error: {0}")]
30    Io(#[from] std::io::Error),
31
32    /// Failed to acquire lock for WiFi operation.
33    #[error("Failed to acquire WiFi lock: {0}")]
34    Lock(String),
35}