#[non_exhaustive]pub enum Error {
Show 39 variants
NameTooLong(usize),
TooMuchPathData,
Write(Error),
Copy(Error),
Seek(Error),
Read(Error),
GetSize(Error),
ContentChunkSizeMismatch {
expected: u64,
actual: u64,
path: Vec<u8>,
},
MissingDirectoryChunkIndexEntry,
MissingDirectoryNamesChunkIndexEntry,
SerializeIndex(Error),
SerializeDirectoryChunkIndexEntry(Error),
SerializeDirectoryNamesChunkIndexEntry(Error),
SerializeDirectoryEntry(Error),
InvalidMagic([u8; 8]),
InvalidIndexEntriesLen(u64),
IndexEntriesOutOfOrder {
prev: ChunkType,
next: ChunkType,
},
InvalidChunkOffset {
chunk_type: ChunkType,
expected: u64,
actual: u64,
},
InvalidChunkLength {
chunk_type: ChunkType,
offset: u64,
length: u64,
},
InvalidDirectoryNamesChunkLen(u64),
InvalidDirectoryChunkLen(u64),
DirectoryEntriesOutOfOrder {
entry_index: usize,
name: Vec<u8>,
previous_name: Vec<u8>,
},
ZeroLengthName,
NameStartsWithSlash(Vec<u8>),
NameEndsWithSlash(Vec<u8>),
NameContainsNull(Vec<u8>),
NameContainsEmptySegment(Vec<u8>),
NameContainsDotSegment(Vec<u8>),
NameContainsDotDotSegment(Vec<u8>),
PathDataOffsetTooLarge {
entry_index: usize,
offset: usize,
chunk_size: usize,
},
PathDataLengthTooLarge {
entry_index: usize,
offset: usize,
length: u16,
chunk_size: usize,
},
PathDataInvalidUtf8 {
source: Utf8Error,
path: Vec<u8>,
},
PathNotPresent(Vec<u8>),
ReadPastEnd,
ContentChunkOffsetOverflow,
InvalidContentChunkOffset {
name: Vec<u8>,
expected: u64,
actual: u64,
},
ContentChunkEndOverflow {
name: Vec<u8>,
offset: u64,
length: u64,
},
ContentChunkBeyondArchive {
name: Vec<u8>,
lower_bound: u64,
archive_size: u64,
},
ContentChunkDoesNotFitInMemory {
name: Vec<u8>,
chunk_size: u64,
},
}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.
NameTooLong(usize)
TooMuchPathData
Write(Error)
Copy(Error)
Seek(Error)
Read(Error)
GetSize(Error)
ContentChunkSizeMismatch
MissingDirectoryChunkIndexEntry
MissingDirectoryNamesChunkIndexEntry
SerializeIndex(Error)
SerializeDirectoryChunkIndexEntry(Error)
SerializeDirectoryNamesChunkIndexEntry(Error)
SerializeDirectoryEntry(Error)
InvalidMagic([u8; 8])
InvalidIndexEntriesLen(u64)
IndexEntriesOutOfOrder
InvalidChunkOffset
InvalidChunkLength
InvalidDirectoryNamesChunkLen(u64)
InvalidDirectoryChunkLen(u64)
DirectoryEntriesOutOfOrder
ZeroLengthName
NameStartsWithSlash(Vec<u8>)
NameEndsWithSlash(Vec<u8>)
NameContainsNull(Vec<u8>)
NameContainsEmptySegment(Vec<u8>)
NameContainsDotSegment(Vec<u8>)
NameContainsDotDotSegment(Vec<u8>)
PathDataOffsetTooLarge
PathDataLengthTooLarge
PathDataInvalidUtf8
PathNotPresent(Vec<u8>)
ReadPastEnd
ContentChunkOffsetOverflow
InvalidContentChunkOffset
ContentChunkEndOverflow
ContentChunkBeyondArchive
ContentChunkDoesNotFitInMemory
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
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