1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! This module contains all error-related code of the library.
use io;
use result;
use FileViewError;
/// Alias for handling errors more easely.
pub type Result<T> = Result;
/// This enum contains all the possible errors this library can return.
///
/// The possible variants, or error types are:
/// - `UnsupportedPackFile`: Used for when we try to open explicity unsupported PackFiles, like PackFiles from games we don't support yet.
/// - `InvalidHeaderError`: Used for when the Header of the PackFile is not valid.
/// - `InvalidFileError`: Used for when the File we are trying to open is not a valid PackFile.
/// - `IndexIteratorError`: Used when iterating through PackedFiles fails for any reason.
/// - `IOError`: Used for generic IO errors.
//--------------------------------------------------------------------------------//
// From<T> Implementations for Error
//--------------------------------------------------------------------------------//