use thiserror::Error;
pub type Result<T> = std::result::Result<T, KaitaiError>;
#[derive(Debug, Error)]
pub enum KaitaiError {
#[error("end of stream reached, but no terminator {0} found")]
EofBeforeTerminator(char),
#[error("unexpected fixed contents got {actual:?}, was expecting {expected:?}")]
UnexpectedContents {
actual: Vec<u8>,
expected: Vec<u8>,
},
#[error(transparent)]
IoError(#[from] std::io::Error),
}