Struct rkyv::validation::ArchiveValidator [−][src]
An adapter that adds memory validation to a context.
Implementations
impl<C> ArchiveValidator<C>
[src]
pub fn new(inner: C) -> Self
[src]
Wraps the given validator context and adds memory validation.
pub fn into_inner(self) -> C
[src]
Consumes the adapter and returns the underlying validator.
Trait Implementations
impl<C: ArchiveBoundsContext> ArchiveBoundsContext for ArchiveValidator<C>
[src]
unsafe fn check_rel_ptr(
&mut self,
base: *const u8,
offset: isize
) -> Result<*const u8, Self::Error>
[src]
&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>
[src]
&mut self,
ptr: *const u8,
layout: &Layout
) -> Result<(), Self::Error>
impl<C: ArchiveBoundsContext> ArchiveMemoryContext for ArchiveValidator<C>
[src]
unsafe fn claim_bytes(
&mut self,
start: *const u8,
len: usize
) -> Result<(), Self::Error>
[src]
&mut self,
start: *const u8,
len: usize
) -> Result<(), Self::Error>
unsafe fn claim_owned_ptr<T: ArchivePointee + ?Sized>(
&mut self,
ptr: *const T
) -> Result<(), Self::Error> where
Self: ArchiveBoundsContext,
<T as Pointee>::Metadata: LayoutMetadata<T>,
[src]
&mut self,
ptr: *const T
) -> Result<(), Self::Error> where
Self: ArchiveBoundsContext,
<T as Pointee>::Metadata: LayoutMetadata<T>,
fn claim_owned_rel_ptr<T: ArchivePointee + ?Sized>(
&mut self,
rel_ptr: &RelPtr<T>
) -> Result<*const T, Self::Error> where
Self: ArchiveBoundsContext,
<T as Pointee>::Metadata: LayoutMetadata<T>,
[src]
&mut self,
rel_ptr: &RelPtr<T>
) -> Result<*const T, Self::Error> where
Self: ArchiveBoundsContext,
<T as Pointee>::Metadata: LayoutMetadata<T>,
impl<C: Fallible> Fallible for ArchiveValidator<C>
[src]
type Error = ArchiveMemoryError<C::Error>
The error produced by any failing methods
Auto Trait Implementations
impl<C> RefUnwindSafe for ArchiveValidator<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> !Send for ArchiveValidator<C>
impl<C> !Sync for ArchiveValidator<C>
impl<C> Unpin for ArchiveValidator<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for ArchiveValidator<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ArchivePointee for T
[src]
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointee for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,