2023-07-26 23:55:48 -07:00
|
|
|
use {std::path::PathBuf, thiserror::Error};
|
2023-05-23 15:06:55 -07:00
|
|
|
|
|
|
|
#[derive(Error, Debug)]
|
|
|
|
pub enum TieredStorageError {
|
|
|
|
#[error("I/O error: {0}")]
|
|
|
|
Io(#[from] std::io::Error),
|
|
|
|
|
|
|
|
#[error("MagicNumberMismatch: expected {0}, found {1}")]
|
|
|
|
MagicNumberMismatch(u64, u64),
|
2023-07-26 23:55:48 -07:00
|
|
|
|
2023-08-04 12:18:38 -07:00
|
|
|
#[error("AttemptToUpdateReadOnly: attempted to update read-only file {0}")]
|
|
|
|
AttemptToUpdateReadOnly(PathBuf),
|
2023-07-26 23:55:48 -07:00
|
|
|
|
|
|
|
#[error("UnknownFormat: the tiered storage format is unavailable for file {0}")]
|
|
|
|
UnknownFormat(PathBuf),
|
|
|
|
|
|
|
|
#[error("Unsupported: the feature is not yet supported")]
|
|
|
|
Unsupported(),
|
2023-05-23 15:06:55 -07:00
|
|
|
}
|