1mod filters;
2mod huffman;
3mod ppmd;
4pub mod rar13;
5pub mod rar20;
6pub mod rar29;
7pub mod rar50;
8pub mod rarvm;
9
10pub type Result<T> = std::result::Result<T, Error>;
11
12#[derive(Debug, Clone, PartialEq, Eq)]
13#[non_exhaustive]
14pub enum Error {
15 InvalidData(&'static str),
16 NeedMoreInput,
17}
18
19impl std::fmt::Display for Error {
20 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
21 match self {
22 Self::InvalidData(msg) => write!(f, "{msg}"),
23 Self::NeedMoreInput => write!(f, "codec input is truncated"),
24 }
25 }
26}
27
28impl std::error::Error for Error {}