pub enum Error {
Io(Error),
InvalidMagic {
found: [u8; 6],
},
InvalidHexField {
field: &'static str,
},
InvalidFilename,
InvalidHeader {
reason: &'static str,
},
MissingTrailer,
ChecksumMismatch {
expected: u32,
computed: u32,
},
BufferSizeMismatch {
expected: usize,
actual: usize,
},
UnresolvedHardLink {
ino: u32,
},
FilenameTooLong,
FileTooLarge,
}Expand description
Errors that can occur during CPIO archive operations.
Variants§
Io(Error)
An I/O error occurred while reading or writing the archive.
InvalidMagic
The header magic bytes are not 070701 or 070702.
InvalidHexField
A header field contains non-hexadecimal characters.
InvalidFilename
The entry filename is empty or could not be read.
InvalidHeader
A decoded header violates a newc field invariant.
MissingTrailer
The archive ended without a TRAILER!!! sentinel.
ChecksumMismatch
The CRC checksum in a 070702 entry does not match the computed value.
Fields
BufferSizeMismatch
A caller-provided data buffer does not match the entry’s file size.
Fields
UnresolvedHardLink
write only.A hard link references a target path that was not seen earlier in the archive.
FilenameTooLong
write only.The filename exceeds the maximum length representable in a newc header.
FileTooLarge
write only.The file data exceeds the maximum size representable in a newc header (4 GiB).
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()