use std::path::PathBuf;
#[derive(Debug, Clone, PartialEq)]
pub enum WALError {
IOError(String),
UnexpectedEndOfFile(PathBuf),
CorruptedEntry(u64),
PayloadLengthOutOfBound(u64),
InvalidFileName(PathBuf),
OffsetUnderflow, OffsetOverflow, }
impl From<std::io::Error> for WALError {
fn from(value: std::io::Error) -> Self {
WALError::IOError(value.to_string())
}
}