pub enum Error {
Show 16 variants
Io(Error),
FolderNotFound {
path: PathBuf,
},
FileNotFound {
file: String,
folder: PathBuf,
},
KeyFileNotFound,
DecryptionFailed,
PasscodeRequired,
InvalidPasscode,
QDataStreamError {
message: String,
},
UnexpectedEof {
offset: u64,
},
InvalidUtf16,
InvalidFormat {
message: String,
},
NoAccounts,
AccountIndexOutOfRange {
index: usize,
max: usize,
},
ChecksumMismatch,
UnsupportedVersion {
version: u32,
},
AuthKeyExtractionFailed {
reason: String,
},
}Expand description
Errors that can occur during tdata parsing
Variants§
Io(Error)
IO error while reading tdata files
FolderNotFound
The tdata folder path does not exist
FileNotFound
Required file is missing from tdata folder
KeyFileNotFound
Key file (key_data, key_datas) not found
DecryptionFailed
Failed to decrypt tdata - wrong passcode or corrupted data
PasscodeRequired
The tdata folder is password-protected but no passcode provided
InvalidPasscode
Invalid passcode provided
QDataStreamError
QDataStream parsing error
UnexpectedEof
Unexpected end of data while parsing
InvalidUtf16
Invalid UTF-16 string data
InvalidFormat
Invalid data format or structure
NoAccounts
No accounts found in tdata
AccountIndexOutOfRange
Account index out of range
ChecksumMismatch
MD5 checksum mismatch in encrypted data
UnsupportedVersion
Unsupported tdata version
AuthKeyExtractionFailed
Auth key extraction failed
Implementations§
Source§impl Error
impl Error
Sourcepub fn qdatastream(msg: impl Into<String>) -> Self
pub fn qdatastream(msg: impl Into<String>) -> Self
Create a QDataStream error with a message
Sourcepub fn invalid_format(msg: impl Into<String>) -> Self
pub fn invalid_format(msg: impl Into<String>) -> Self
Create an invalid format error with a message
Sourcepub fn auth_key_failed(reason: impl Into<String>) -> Self
pub fn auth_key_failed(reason: impl Into<String>) -> Self
Create an auth key extraction error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()