flamberge-formats 0.1.1

Container parsers for Flamberge (PalmDB, Topaz TPZ0, KFX-ZIP, Amazon ION, EPUB/OCF, PDF)
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum FormatError {
    #[error("unexpected end of data at offset {0}")]
    Truncated(usize),

    #[error("bad magic: {0}")]
    BadMagic(String),

    #[error("invalid structure: {0}")]
    Invalid(String),

    #[error("i/o error: {0}")]
    Io(#[from] std::io::Error),

    #[error("not yet implemented: {0}")]
    Unimplemented(&'static str),
}