Expand description
Error types for RAR parsing and decompression.
This module provides the RarError type which covers all possible errors
that can occur when parsing, decompressing, or decrypting RAR archives.
§Error Categories
| Category | Errors | Description |
|---|---|---|
| Format | InvalidSignature, InvalidHeader | File is not a valid RAR archive |
| Encryption | PasswordRequired, DecryptionFailed | Encryption-related errors |
| Decompression | DecompressionNotSupported | Unsupported compression method |
| I/O | Io, BufferTooSmall | Read/write errors |
§Example
ⓘ
use rar_stream::{RarFilesPackage, RarError};
match package.parse(opts).await {
Ok(files) => println!("Found {} files", files.len()),
Err(RarError::InvalidSignature) => eprintln!("Not a RAR file"),
Err(RarError::PasswordRequired) => eprintln!("Archive is encrypted"),
Err(e) => eprintln!("Error: {}", e),
}Enums§
- RarError
- Error type for RAR operations.