sakka 0.0.14

A low-level framework for implementing binary file format parsers and writers.
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
#[non_exhaustive]
pub enum Error {
    #[error("Out of bounds")]
    OutOfBounds,

    #[error("Invalid alignment")]
    InvalidAlignment,

    #[error("Collection length overflow")]
    CollectionLengthOverflow,

    #[error("Collection length is negative")]
    CollectionLengthNegative,

    #[error("Invalid enum discriminant")]
    InvalidEnumDiscriminant,

    #[error("Invalid magic: {0}")]
    InvalidMagic(&'static str),
}