pub enum ValidationError {
FileTooSmall {
actual: u64,
minimum: u64,
},
FileTooLarge {
actual: u64,
maximum: u64,
},
BadMagic {
expected: u64,
actual: u64,
},
UnsupportedVersion {
version: u32,
supported: Vec<u32>,
},
ChecksumMismatch {
expected: [u8; 32],
actual: [u8; 32],
},
CorruptedEdge {
index: usize,
reason: String,
},
InvalidOffset {
offset: u64,
max: u64,
},
InvalidLength {
offset: u64,
length: u64,
max: u64,
},
AlignmentViolation {
offset: u64,
required_alignment: usize,
},
OutOfBounds {
offset: usize,
length: usize,
region_size: usize,
},
IoError(String),
TruncatedFile {
expected: u64,
actual: u64,
},
}Expand description
Validation error types with detailed context
Variants§
FileTooSmall
File is smaller than minimum valid size
FileTooLarge
File is larger than maximum supported size
BadMagic
Invalid magic number at file header
UnsupportedVersion
Unsupported format version
ChecksumMismatch
Footer checksum does not match
CorruptedEdge
Edge at given index is corrupted
InvalidOffset
Offset points outside valid data region
InvalidLength
Length would exceed data region
AlignmentViolation
Alignment violation
OutOfBounds
Access to unmapped or invalid region
IoError(String)
I/O error during validation
TruncatedFile
File was truncated after mmap
Trait Implementations§
Source§impl Clone for ValidationError
impl Clone for ValidationError
Source§fn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
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 moreSource§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
impl Display for ValidationError
Source§impl Error for ValidationError
impl Error for ValidationError
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 ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more