Struct rkyv::validation::ArchiveBoundsValidator [−][src]
A validator that can bounds check pointers in an archive.
Implementations
impl ArchiveBoundsValidator
[src]
pub fn new(bytes: &[u8]) -> Self
[src]
Creates a new bounds validator for the given byte range.
pub fn begin(&self) -> *const u8
[src]
Gets a pointer to the beginning of the validator’s byte range.
pub fn len(&self) -> usize
[src]
Gets the length of the validator’s byte range.
pub fn is_empty(&self) -> bool
[src]
Returns whether the byte range is empty.
Trait Implementations
impl ArchiveBoundsContext for ArchiveBoundsValidator
[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 Fallible for ArchiveBoundsValidator
[src]
type Error = ArchiveBoundsError
The error produced by any failing methods
Auto Trait Implementations
impl RefUnwindSafe for ArchiveBoundsValidator
impl !Send for ArchiveBoundsValidator
impl !Sync for ArchiveBoundsValidator
impl Unpin for ArchiveBoundsValidator
impl UnwindSafe for ArchiveBoundsValidator
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>,