pub enum ArchiveError {
Io(Error),
DecodeFailed {
format: String,
reason: String,
},
EncodeFailed {
format: String,
reason: String,
},
DuplicateFiles {
paths: Vec<String>,
},
UnsupportedFormat(String),
InvalidArchive(String),
CompressionError(String),
DecompressionError(String),
}Expand description
Errors that can occur during archive operations
Variants§
Io(Error)
I/O error occurred during archive operation
DecodeFailed
Failed to decode an archive
Fields
EncodeFailed
Failed to encode an archive
Fields
DuplicateFiles
Duplicate file paths detected in the archive
UnsupportedFormat(String)
The archive format is not supported or not enabled
InvalidArchive(String)
The archive structure is invalid
CompressionError(String)
Compression operation failed
DecompressionError(String)
Decompression operation failed
Implementations§
Source§impl ArchiveError
impl ArchiveError
Sourcepub fn io_context(error: Error, context: impl Display) -> Self
pub fn io_context(error: Error, context: impl Display) -> Self
Wrap an std::io::Error with additional context.
The original std::io::ErrorKind is preserved, while the message is
prefixed with a description of the operation that failed. This keeps
errors specific (for example, which path could not be written) without
discarding the underlying operating-system error.
Trait Implementations§
Source§impl Debug for ArchiveError
impl Debug for ArchiveError
Source§impl Display for ArchiveError
impl Display for ArchiveError
Source§impl Error for ArchiveError
impl Error for ArchiveError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for ArchiveError
impl !UnwindSafe for ArchiveError
impl Freeze for ArchiveError
impl Send for ArchiveError
impl Sync for ArchiveError
impl Unpin for ArchiveError
impl UnsafeUnpin for ArchiveError
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