use thiserror::Error;
#[derive(Debug, Error)]
pub enum BinaryError {
#[error("attempt to read past EOF")]
ReadPastEof,
#[error("invalid character read from stream")]
InvalidChar,
#[error(transparent)]
TryFromInt(#[from] std::num::TryFromIntError),
#[error(transparent)]
Utf8Error(#[from] std::string::FromUtf8Error),
#[error(transparent)]
Io(#[from] std::io::Error),
}