#[non_exhaustive]pub enum InvalidArchiveSubCode {
TarAmbiguity,
TarTrailer,
LinkTarget,
DuplicateEntry,
EntryName,
DeclaredSize,
Integrity,
ZipReader,
TarReader,
SevenZReader,
}Expand description
Finer classification of an ErrorCode::InvalidArchive error.
Bindings expose it so callers can tell a TAR refusal from any other malformed archive without parsing the message.
§Examples
use exarch_core::InvalidArchiveSubCode;
assert_eq!(InvalidArchiveSubCode::TarTrailer.as_str(), "TAR_TRAILER");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TarAmbiguity
TarTrailer
A corrupt or truncated stream after the TAR end-of-archive marker.
LinkTarget
A link entry whose target is missing, unreadable or unusable.
DuplicateEntry
An entry path that is already taken.
EntryName
An entry path or name that cannot be read.
DeclaredSize
A declared size that contradicts the archive.
Integrity
An entry whose integrity decode failed.
ZipReader
A failure of the ZIP reader or of the structural check built on it: the archive or an entry cannot be opened or read, the census and the reader disagree about the central directory, an entry’s data range is not representable, or the zstd entries cannot be walked within the archive extent.
It also covers I/O failures the zip crate wraps into its own
errors. A wrapped I/O error surfaces as ErrorCode::IoError during
the structure scan at open, where the reader’s own fault is
preferred, but as this code when extraction, listing or the
descriptor-tail re-read hit it.
TarReader
A failure of the TAR reader: an entry, its PAX header or the entry stream cannot be read, or the reader was used after an entry was abandoned.
SevenZReader
A failure of the 7z reader: the header cannot be parsed or is
inconsistent, a block uses an unsupported coder, or sevenz-rust2
reports an error with no kind of its own.
Implementations§
Trait Implementations§
Source§impl Clone for InvalidArchiveSubCode
impl Clone for InvalidArchiveSubCode
Source§impl ClosedEnum for InvalidArchiveSubCode
impl ClosedEnum for InvalidArchiveSubCode
impl Copy for InvalidArchiveSubCode
Source§impl Debug for InvalidArchiveSubCode
impl Debug for InvalidArchiveSubCode
Source§impl Display for InvalidArchiveSubCode
impl Display for InvalidArchiveSubCode
impl Eq for InvalidArchiveSubCode
Source§impl Hash for InvalidArchiveSubCode
impl Hash for InvalidArchiveSubCode
Source§impl PartialEq for InvalidArchiveSubCode
impl PartialEq for InvalidArchiveSubCode
impl StructuralPartialEq for InvalidArchiveSubCode
Auto Trait Implementations§
impl Freeze for InvalidArchiveSubCode
impl RefUnwindSafe for InvalidArchiveSubCode
impl Send for InvalidArchiveSubCode
impl Sync for InvalidArchiveSubCode
impl Unpin for InvalidArchiveSubCode
impl UnsafeUnpin for InvalidArchiveSubCode
impl UnwindSafe for InvalidArchiveSubCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.