Trait rkyv::validation::ArchiveBoundsContext [−][src]
pub trait ArchiveBoundsContext: Fallible { unsafe fn check_rel_ptr(
&mut self,
base: *const u8,
offset: isize
) -> Result<*const u8, Self::Error>; unsafe fn bounds_check_ptr(
&mut self,
ptr: *const u8,
layout: &Layout
) -> Result<(), Self::Error>; }
Expand description
A context that can check relative pointers.
Required methods
Checks the given parts of a relative pointer for bounds issues
Safety
The caller must guarantee that the base pointer is inside the archive for this context.