use thiserror::Error;
#[derive(Debug, Error, PartialEq, Eq)]
pub enum FcbError {
#[error("not an FCB container (bad magic)")]
BadMagic,
#[error("unsupported FCB version: bundle requires reader >= {min_reader}, this reader supports {supported}")]
UnsupportedVersion { min_reader: u16, supported: u16 },
#[error("malformed FCB container: {0}")]
Malformed(String),
#[error("wrong passphrase")]
WrongPassphrase,
#[error("corrupt or tampered bundle")]
Corrupt,
}
pub type Result<T> = core::result::Result<T, FcbError>;