#[non_exhaustive]pub enum LhaError<E> {
Io(E),
HeaderParse(LhaHeaderError),
Decompress(DecompressionError),
Checksum,
}Expand description
delharc main error enum.
With std feature enabled E is std::io::Error and
LhaError can be converted to std::io::Error using
From or Into.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Io(E)
An error occured while reading from the data stream
HeaderParse(LhaHeaderError)
An error occured when parsing LHA header
Decompress(DecompressionError)
An error occured when decompressing a file
Checksum
A checksum mismatch error occured
Trait Implementations§
impl<E: Eq> Eq for LhaError<E>
Source§impl<E: Error + 'static> Error for LhaError<E>
impl<E: Error + 'static> Error for LhaError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<E> From<BuildError> for LhaError<E>
impl<E> From<BuildError> for LhaError<E>
Source§fn from(err: BuildError) -> LhaError<E>
fn from(err: BuildError) -> LhaError<E>
Converts to this type from the input type.
Source§impl<E> From<DecompressionError> for LhaError<E>
impl<E> From<DecompressionError> for LhaError<E>
Source§fn from(err: DecompressionError) -> LhaError<E>
fn from(err: DecompressionError) -> LhaError<E>
Converts to this type from the input type.
Source§impl<R: Read> From<LhaDecodeError<R>> for LhaError<R::Error>
impl<R: Read> From<LhaDecodeError<R>> for LhaError<R::Error>
Source§fn from(e: LhaDecodeError<R>) -> Self
fn from(e: LhaDecodeError<R>) -> Self
Converts to this type from the input type.
Source§impl<E> From<LhaHeaderError> for LhaError<E>
impl<E> From<LhaHeaderError> for LhaError<E>
Source§fn from(err: LhaHeaderError) -> LhaError<E>
fn from(err: LhaHeaderError) -> LhaError<E>
Converts to this type from the input type.
impl<E: PartialEq> StructuralPartialEq for LhaError<E>
Auto Trait Implementations§
impl<E> Freeze for LhaError<E>where
E: Freeze,
impl<E> RefUnwindSafe for LhaError<E>where
E: RefUnwindSafe,
impl<E> Send for LhaError<E>where
E: Send,
impl<E> Sync for LhaError<E>where
E: Sync,
impl<E> Unpin for LhaError<E>where
E: Unpin,
impl<E> UnsafeUnpin for LhaError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for LhaError<E>where
E: UnwindSafe,
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