[][src]Struct rkyv::validation::ArchiveContext

pub struct ArchiveContext { /* fields omitted */ }

Context to perform archive validation.

Implementations

impl ArchiveContext[src]

pub fn new(bytes: &[u8]) -> Self[src]

Creates a new archive context for the given byte slice

pub unsafe fn claim<T: CheckBytes<ArchiveContext>>(
    &mut self,
    base: *const u8,
    offset: isize,
    count: usize
) -> Result<*const u8, ArchiveMemoryError>
[src]

Checks the relative pointer with given base and offset, then claims count items at the target location.

Safety

base must be inside the archive this context was created for.

pub unsafe fn claim_bytes(
    &mut self,
    base: *const u8,
    offset: isize,
    count: usize,
    align: usize
) -> Result<*const u8, ArchiveMemoryError>
[src]

Checks the memory pointed to by the given relative pointer

Safety

base must be inside the archive this context was created for.

Trait Implementations

impl<T: CheckBytes<ArchiveContext>> CheckBytes<ArchiveContext> for ArchivedRef<T>[src]

type Error = ArchivedRefError<T::Error>

The error that may result from validating the type.

impl<T: CheckBytes<ArchiveContext>> CheckBytes<ArchiveContext> for ArchivedSlice<T>[src]

type Error = ArchivedSliceError<T::Error>

The error that may result from validating the type.

impl CheckBytes<ArchiveContext> for ArchivedStringSlice[src]

type Error = ArchivedStringSliceError

The error that may result from validating the type.

impl<K: CheckBytes<ArchiveContext> + Eq + Hash, V: CheckBytes<ArchiveContext>> CheckBytes<ArchiveContext> for ArchivedHashMap<K, V>[src]

type Error = ArchivedHashMapError<K::Error, V::Error>

The error that may result from validating the type.

impl<K: CheckBytes<ArchiveContext> + Eq + Hash> CheckBytes<ArchiveContext> for ArchivedHashSet<K>[src]

type Error = ArchivedHashMapError<K::Error, <() as CheckBytes<ArchiveContext>>::Error>

The error that may result from validating the type.

impl CheckBytes<ArchiveContext> for RelPtr[src]

type Error = Unreachable

The error that may result from validating the type.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.