1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
use thiserror::Error as ThisError;

#[non_exhaustive]
#[derive(Debug, ThisError)]
pub enum Error {
    #[error("unexpected EOF while reading")]
    Eof,
    #[error("loss of data with cast")]
    BadCast,
    #[error("invalid read size (zero or too large)")]
    InvalidReadSize,
    #[cfg(any(feature = "vbr", doc))]
    #[error("invalid VBR width (must be > 1 but <= system word width)")]
    InvalidVbrWidth,
}