pub enum Error {
Io {
source: Error,
},
TooManyElements,
ElementTooBig,
CorruptedFile {
msg: String,
},
MagicMismatch {
expected: u32,
found: u32,
},
ChecksumMismatch {
expected: u32,
found: u32,
},
InvalidValue {
msg: String,
},
OutOfBounds {
msg: String,
},
SequenceMismatch {
expected: u64,
found: u64,
},
UnsupportedVersion {
detected: u32,
supported: u32,
},
}Expand description
The error type for [QueueFile] operations.
Each variant represents a distinct category of failure that can occur when working with queue files.
Variants§
Io
An I/O error occurred while reading or writing the queue file.
TooManyElements
The queue contains more than i32::MAX elements.
This is a limitation of the on-disk format.
ElementTooBig
An individual element exceeds the maximum allowed size.
Elements are limited to i32::MAX bytes.
CorruptedFile
The queue file contains corrupted data.
This can indicate a hardware failure, incomplete write, or manual tampering with the file.
MagicMismatch
The file header magic bytes don’t match the expected format.
ChecksumMismatch
A CRC-32 checksum verification failed.
This indicates data corruption in the element header or payload.
InvalidValue
A value in the queue file is invalid or out of expected range.
OutOfBounds
A calculated position is outside the valid file bounds.
SequenceMismatch
Element sequence numbers are not in the expected order.
This indicates a corrupted queue or recovery failure in v2 format.
UnsupportedVersion
The queue file format version is not supported.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()