use thiserror::Error;
#[derive(Debug, Error)]
pub enum UffError {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("invalid magic: expected UFF\\x00, got {0:?}")]
BadMagic([u8; 4]),
#[error("unsupported version: {0}")]
UnsupportedVersion(u8),
#[error("invalid UTF-8 in string field: {0}")]
Utf8(#[from] std::string::FromUtf8Error),
}