[−][src]Struct rkyv::validation::ArchiveContext
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]
&mut self,
base: *const u8,
offset: isize,
count: usize
) -> Result<*const u8, ArchiveMemoryError>
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]
&mut self,
base: *const u8,
offset: isize,
count: usize,
align: usize
) -> Result<*const u8, ArchiveMemoryError>
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.
pub unsafe fn check_bytes<'a>(
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
[src]
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
impl<T: CheckBytes<ArchiveContext>> CheckBytes<ArchiveContext> for ArchivedSlice<T>
[src]
type Error = ArchivedSliceError<T::Error>
The error that may result from validating the type.
pub unsafe fn check_bytes<'a>(
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
[src]
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
impl CheckBytes<ArchiveContext> for ArchivedStringSlice
[src]
type Error = ArchivedStringSliceError
The error that may result from validating the type.
pub unsafe fn check_bytes<'a>(
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
[src]
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
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.
pub unsafe fn check_bytes<'a>(
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
[src]
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
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.
pub unsafe fn check_bytes<'a>(
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
[src]
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
impl CheckBytes<ArchiveContext> for RelPtr
[src]
type Error = Unreachable
The error that may result from validating the type.
pub unsafe fn check_bytes<'a>(
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
[src]
bytes: *const u8,
context: &mut ArchiveContext
) -> Result<&'a Self, Self::Error>
Auto Trait Implementations
impl RefUnwindSafe for ArchiveContext
impl !Send for ArchiveContext
impl !Sync for ArchiveContext
impl Unpin for ArchiveContext
impl UnwindSafe for ArchiveContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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, 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>,