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>; }

A context that can check relative pointers.

Required methods

unsafe fn check_rel_ptr(
    &mut self,
    base: *const u8,
    offset: isize
) -> Result<*const u8, Self::Error>
[src]

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.

unsafe fn bounds_check_ptr(
    &mut self,
    ptr: *const u8,
    layout: &Layout
) -> Result<(), Self::Error>
[src]

Checks the given memory block for bounds issues.

Safety

The caller must guarantee that the pointer is inside the archive for this context.

Loading content...

Implementors

impl ArchiveBoundsContext for ArchiveBoundsValidator[src]

impl<C: ArchiveBoundsContext> ArchiveBoundsContext for ArchiveValidator<C>[src]

impl<C: ArchiveBoundsContext> ArchiveBoundsContext for SharedArchiveValidator<C>[src]

Loading content...