pub enum FormatError {
Truncated,
NoEocd,
BadSignature {
what: &'static str,
offset: u64,
},
Zip64Unsupported,
Zip64Inconsistent,
CentralDirOutOfRange {
cd_offset: u64,
cd_size: u64,
},
TooManyEntries(usize),
}Expand description
Structural defects in a ZIP container. Each variant preserves the offending value/location (CLAUDE.md “Show the unrecognized value”).
Variants§
Truncated
A header read ran past the available bytes.
NoEocd
No End Of Central Directory record was found.
BadSignature
A record did not start with its expected signature.
Zip64Unsupported
The archive uses Zip64 features not yet implemented.
Zip64Inconsistent
A 0xFFFFFFFF sentinel was present but the Zip64 record/extra field that should carry the real value is missing or malformed.
CentralDirOutOfRange
The central directory offset/size fall outside the file.
Fields
TooManyEntries(usize)
The EOCD declared an entry count beyond the safety ceiling.
Trait Implementations§
Source§impl Debug for FormatError
impl Debug for FormatError
Source§impl Display for FormatError
impl Display for FormatError
Source§impl Error for FormatError
impl Error for FormatError
1.30.0 · 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 From<FormatError> for ZipCoreError
impl From<FormatError> for ZipCoreError
Source§fn from(source: FormatError) -> Self
fn from(source: FormatError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FormatError
impl RefUnwindSafe for FormatError
impl Send for FormatError
impl Sync for FormatError
impl Unpin for FormatError
impl UnsafeUnpin for FormatError
impl UnwindSafe for FormatError
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