mirror of
https://github.com/eigenein/wotbreplay-parser.git
synced 2026-10-21 18:37:00 +02:00
27 lines
645 B
Rust
27 lines
645 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
#[error("ZIP error")]
|
|
ZipError(#[from] zip::result::ZipError),
|
|
|
|
#[error("Protocol Buffers error")]
|
|
DecodeFailed(#[from] prost::DecodeError),
|
|
|
|
#[error("Pickle error")]
|
|
UnpickleFailed(#[from] serde_pickle::Error),
|
|
|
|
#[error("I/O error")]
|
|
IoError(#[from] std::io::Error),
|
|
|
|
#[error("UTF-8 error")]
|
|
StringDecodeError(#[from] std::string::FromUtf8Error),
|
|
|
|
#[cfg(feature = "meta")]
|
|
#[error("JSON error")]
|
|
JsonDecodeFailed(#[from] serde_json::Error),
|
|
|
|
#[error("invalid magic: {0:#X}, expected: {1:#X}")]
|
|
InvalidMagic(u32, u32),
|
|
}
|