reinhardt_utils/storage/
errors.rs1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum StorageError {
8 #[error("File not found: {0}")]
10 NotFound(String),
11
12 #[error("IO error: {0}")]
14 Io(#[from] std::io::Error),
15
16 #[error("Invalid path: {0}")]
18 InvalidPath(String),
19
20 #[error("Storage full")]
22 StorageFull,
23
24 #[error("Permission denied: {0}")]
26 PermissionDenied(String),
27
28 #[error("File already exists: {0}")]
30 AlreadyExists(String),
31}
32
33pub type StorageResult<T> = Result<T, StorageError>;