pub enum Error {
Io(Error),
Parse(Box<dyn Error>),
Encrypted,
InvalidInput(String),
InvalidPartition(usize),
Decompress {
partition_num: usize,
chunk_num: usize,
chunk_type: ChunkType,
},
UnsupportedEncryption(String),
InvalidPassword,
Decryption(ErrorStack),
}
Expand description
This type represents all possible errors that can occur when working with DMGs.
Variants§
Io(Error)
The was an IO error while reading or writing.
Parse(Box<dyn Error>)
There was an error parsing the DMG header or partition table. The file is most likely not a valid DMG.
Encrypted
The DMG is encrypted. Use EncryptedDmgReader to read encrypted DMGs.
InvalidInput(String)
The input is not a valid DMG file.
InvalidPartition(usize)
The partition number supplied is not valid.
Decompress
There was an error while decompressing a data chunk.
UnsupportedEncryption(String)
The DMG uses an unsupported header version, encryption algorithm or key-derivation fucntion.
InvalidPassword
The DMG could not be decrypted using the given password.
Decryption(ErrorStack)
There was an OpenSSL error during decryption.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ErrorStack> for Error
impl From<ErrorStack> for Error
source§fn from(err: ErrorStack) -> Error
fn from(err: ErrorStack) -> Error
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !Send for Error
impl !Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more