Enum rkyv::validation::validators::ArchiveError
source · pub enum ArchiveError {
Overflow {
base: *const u8,
offset: isize,
},
Underaligned {
expected_align: usize,
actual_align: usize,
},
OutOfBounds {
base: *const u8,
offset: isize,
range: Range<*const u8>,
},
Overrun {
ptr: *const u8,
size: usize,
range: Range<*const u8>,
},
Unaligned {
ptr: *const u8,
align: usize,
},
SubtreePointerOutOfBounds {
ptr: *const u8,
subtree_range: Range<*const u8>,
},
SubtreePointerOverrun {
ptr: *const u8,
size: usize,
subtree_range: Range<*const u8>,
},
RangePoppedOutOfOrder {
expected_depth: usize,
actual_depth: usize,
},
UnpoppedSubtreeRanges {
last_range: usize,
},
ExceededMaximumSubtreeDepth {
max_subtree_depth: usize,
},
LayoutError {
layout_error: LayoutError,
},
}
Expand description
Errors that can occur when checking archive memory.
Variants§
Overflow
Computing the target of a relative pointer overflowed
Underaligned
The archive is under-aligned for one of the types inside
Fields
OutOfBounds
A pointer pointed outside the bounds of the archive
Fields
Overrun
There wasn’t enough space for the desired type at the pointed location
Fields
Unaligned
The pointer wasn’t aligned properly for the desired type
SubtreePointerOutOfBounds
The pointer wasn’t within the subtree range
SubtreePointerOverrun
There wasn’t enough space in the subtree range for the desired type at the pointed location
Fields
RangePoppedOutOfOrder
A subtree range was popped out of order.
Subtree ranges must be popped in the reverse of the order they are pushed.
Fields
UnpoppedSubtreeRanges
A subtree range was not popped before validation concluded.
ExceededMaximumSubtreeDepth
The maximum subtree depth was reached or exceeded.
LayoutError
A layout error occurred
Fields
§
layout_error: LayoutError
A layout error
Trait Implementations§
source§impl Debug for ArchiveError
impl Debug for ArchiveError
source§impl Display for ArchiveError
impl Display for ArchiveError
source§impl Error for ArchiveError
impl Error for ArchiveError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
impl Send for ArchiveError
impl Sync for ArchiveError
Auto Trait Implementations§
impl Freeze for ArchiveError
impl RefUnwindSafe for ArchiveError
impl Unpin for ArchiveError
impl UnwindSafe for ArchiveError
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.