pub enum Error {
Show 17 variants
Unknown,
CantReadMagicBytes,
CantWriteMagicBytes,
IncorrectMagicBytes([u8; 3]),
VersionMismatch((u8, u8, u8), (u8, u8, u8)),
CantReadHeader,
CantWriteHeader,
CorruptHeader,
CorruptFileHeader,
CorruptDirectory,
CantReadDirectory,
CantWriteDirectory,
CantReadFile,
CantWriteFile,
CantReadFileHeader,
CantWriteFileHeader,
FileNotFound(String),
}Expand description
Library-wide error type
Variants§
Unknown
And unknown error has occured
CantReadMagicBytes
Cant read the magic bytes
CantWriteMagicBytes
Cant write the magic bytes
IncorrectMagicBytes([u8; 3])
Incorrect first 3 bytes
VersionMismatch((u8, u8, u8), (u8, u8, u8))
Incorrect version
CantReadHeader
Cant read header
CantWriteHeader
Cant write header
CorruptHeader
Corrupt archive header
CorruptFileHeader
Corrupt file header
CorruptDirectory
Corrupt directory
CantReadDirectory
Couldnt read directory
CantWriteDirectory
Couldnt write directory
CantReadFile
Couldnt read file
CantWriteFile
Couldnt write file
CantReadFileHeader
Couldnt read file header
CantWriteFileHeader
Couldnt write file header
FileNotFound(String)
Couldnt find the file specified
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
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