threecrate_io/error.rs
1//! Error types for I/O operations
2
3use thiserror::Error;
4
5/// Errors that can occur during I/O operations
6#[derive(Error, Debug)]
7pub enum IoError {
8 #[error("File not found: {path}")]
9 FileNotFound { path: String },
10
11 #[error("Invalid file format: {format}")]
12 InvalidFormat { format: String },
13
14 #[error("Parse error: {message}")]
15 ParseError { message: String },
16
17 #[error("Write error: {message}")]
18 WriteError { message: String },
19
20 #[error("IO error: {0}")]
21 Io(#[from] std::io::Error),
22}