use std::path::PathBuf;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum StorageError {
#[error("Storage I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Segment not found: {path}")]
NotFound {
path: PathBuf,
},
#[error("Invalid segment path: {detail}")]
InvalidPath {
detail: String,
},
}
pub type Result<T> = std::result::Result<T, StorageError>;