pub enum CorruptDataError {
EmptyArchive,
InvalidBlockSize,
TooShort {
byte_count: usize,
block_count: usize,
},
InvalidChecksum {
block_index: usize,
},
InvalidTypeFlag {
block_index: usize,
},
InvalidPayloadSize {
block_index: usize,
},
PayloadExtendsBeyondArchive {
block_index: usize,
},
MissingTerminator,
}Expand description
Describes why archive validation failed.
Variants§
EmptyArchive
The archive contains no data.
InvalidBlockSize
The archive length is not a multiple of the 512-byte block size.
TooShort
The archive is shorter than MIN_BLOCK_COUNT blocks.
Fields
InvalidChecksum
The header at block_index has an invalid checksum.
InvalidTypeFlag
The header at block_index has an unsupported type flag.
InvalidPayloadSize
The payload size in the header at block_index is invalid.
PayloadExtendsBeyondArchive
A payload starting at block_index extends past the archive.
MissingTerminator
The archive does not end with two zero blocks.
Trait Implementations§
Source§impl Clone for CorruptDataError
impl Clone for CorruptDataError
Source§fn clone(&self) -> CorruptDataError
fn clone(&self) -> CorruptDataError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CorruptDataError
Source§impl Debug for CorruptDataError
impl Debug for CorruptDataError
Source§impl Display for CorruptDataError
impl Display for CorruptDataError
impl Eq for CorruptDataError
Source§impl Error for CorruptDataError
impl Error for CorruptDataError
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 PartialEq for CorruptDataError
impl PartialEq for CorruptDataError
impl StructuralPartialEq for CorruptDataError
Auto Trait Implementations§
impl Freeze for CorruptDataError
impl RefUnwindSafe for CorruptDataError
impl Send for CorruptDataError
impl Sync for CorruptDataError
impl Unpin for CorruptDataError
impl UnsafeUnpin for CorruptDataError
impl UnwindSafe for CorruptDataError
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